V4: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
{{Cleanup | reason=Auto-imported from ExpressionEngine.}}
{{Cleanup | reason=Auto-imported from ExpressionEngine.}}


==== V4 Javascript Engine ====
== V4 Javascript Engine ==
[http://qt.io/groups/qt-contributors-summit-2013/wiki/QML-engine Why it was created?]
[http://qt.io/groups/qt-contributors-summit-2013/wiki/QML-engine Why it was created?]


===== Hacking =====
=== Environment Variables ===
 
You need to set specific environment variables to debug this engine. In this wiki only few of them are described. To get full list of them you can try to open '''qtdeclarative.pro''' and search for text '''"QV4_'''.
 
* '''QV4_SHOW_IR''' - prints intermediate representation of code. It's rather long output because many optimisation techniques are applied.
* '''QV4_SHOW_ASM''' prints dissassembly output. If it prints message ''disassembly not available for range'' additional macros will have to be added which currently requires significant effort; so start your hacking from qtdeclarative/src/3rdparty/masm/disassembler/Disassembler.cpp
* '''QV4_FORCE_INTERPRETER''' - disables just-in-time compilation. This usually significantly degrades performance and therefore only should be used for debugging purposes.
 
=== Hacking ===


TODO: maybe explain main purprose of some subprojects (where parsing, where optimisations, where jitter is executed..)
TODO: maybe explain main purprose of some subprojects (where parsing, where optimisations, where jitter is executed..)


You need to set specific environment variables to debug this engine. In this wiki only few of them are described. To get full list of them you can try to open '''qtdeclarative.pro''' and search for text '''qgetenv("QV4_'''.
=== Running the EcmaScript 262 Test suite ===
 
'''QV4_SHOW_IR''' prints intermediate representation of code. It's rather long output because many optimisation techniques are applied.
'''QV4_SHOW_ASM''' prints dissassembly ouput. If it prints message ''disassembly not available for range'' I will need to define some macroses for C++ preprocessor. I haven't succeeded to do it without any pain, so start your hacking from qtdeclarative/src/3rdparty/masm/disassembler/Disassembler.cpp .


==== Running the EcmaScript 262 Test suite ====
It's reasonable to verify new features by running the EcmaScript 262 test suite.


# Check out the test suite submodule repository:
# Check out the test suite submodule repository:

Revision as of 16:26, 11 January 2016

This article may require cleanup to meet the Qt Wiki's quality standards. Reason: Auto-imported from ExpressionEngine.
Please improve this article if you can. Remove the {{cleanup}} tag and add this page to Updated pages list after it's clean.

V4 Javascript Engine

Why it was created?

Environment Variables

You need to set specific environment variables to debug this engine. In this wiki only few of them are described. To get full list of them you can try to open qtdeclarative.pro and search for text "QV4_.

  • QV4_SHOW_IR - prints intermediate representation of code. It's rather long output because many optimisation techniques are applied.
  • QV4_SHOW_ASM prints dissassembly output. If it prints message disassembly not available for range additional macros will have to be added which currently requires significant effort; so start your hacking from qtdeclarative/src/3rdparty/masm/disassembler/Disassembler.cpp
  • QV4_FORCE_INTERPRETER - disables just-in-time compilation. This usually significantly degrades performance and therefore only should be used for debugging purposes.

Hacking

TODO: maybe explain main purprose of some subprojects (where parsing, where optimisations, where jitter is executed..)

Running the EcmaScript 262 Test suite

It's reasonable to verify new features by running the EcmaScript 262 test suite.

  1. Check out the test suite submodule repository:
 git submodule update --init --checkout tests/manual/v4/test262
  1. Run the wrapper script in the tests/manual/v4 sub-directory:
   python ./test262.py