aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/jsruntime.pri
Commit message (Collapse)AuthorAgeFilesLines
* QML Engine: Support for JavaScript PromisesValery Kotov2018-10-111-2/+4
| | | | | | | Support for JavaScript Promises. Change-Id: I90ce328b35f3bdf3fd666a8829f22b5d56b6f861 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Partial Atomics supportLars Knoll2018-08-261-0/+2
| | | | | | | | | | Implement support for basic atomic operations on SharedArrayBuffers. Half of the methods still need a proper implementation. Change-Id: Ia88da358e0c2ae6d28e9bcc1feb8980b6f51a812 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add support for compiling ES modules ahead of timeSimon Hausmann2018-08-171-1/+1
| | | | | | | | | | | | This is also pretty straight-forward by adding .mjs as supported extension in the qmake and cmake support. This also tweaks qv4engine.cpp to share the same module compilation function across all code paths. Change-Id: Ia0e23c78a794f2330ecf8f991ee6ea948f4ac89d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add initial basic support for ES6 modulesSimon Hausmann2018-08-091-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The entry point from the parsing perspective into modules is not QV4::Script but QV4::ExecutionEngine::compileModule. For convenience, the ESModule AST node gets a body, which is the statement list connected between the ModuleItemList items that are not import/export declarations. The QV4::Module allocates a call context where the exported variables are stored as named locals. This will also become the module namespace object. The imports in turn is an array of value pointers that point into the locals array of the context of the imported modules. The default module loading in ExecutionEngine assumes the accessibility of module urls via QFile (so local file system or resource). This is what qmljs also uses and QJSEngine as well via public API in the future. The test runner compiles the modules manually and injects them, because they need to be compiled together with the test harness code. The QML type loader will the mechanism for injection in the future for module imports from .qml files. Change-Id: I93be9cfe54c651fdbd08c5e1d22d58f47284e54f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Move the C++ and JS stack frame definitions into it's own fileLars Knoll2018-07-031-0/+2
| | | | | Change-Id: I86e89e07197aec6071809c2d32bd5c98cb7ac6f6 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Move the Vtable for Managed objects into it's own fileLars Knoll2018-07-031-1/+2
| | | | | | | | Move both the code from qv4object and qv4managed into a new qv4vtable_p.h file. Change-Id: Ib1d58120b6c3b9b779b2692526c7e40a5265c4db Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Introduce a PropertyKey class that inherits from ValueLars Knoll2018-07-021-0/+2
| | | | | | | | | | | This will replace Identifier over the next few commits. The advantage of PropertyKey is that it can be stored on the JS stack, so that a GC run won't accidentally clean up the string/symbol referenced by the key. Change-Id: Ib4daa4616bcfa537e6d371ef7c7740bc7727a50d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Map/Set: Introduce QV4::ESTableRobin Burchell2018-06-271-2/+4
| | | | | | | | | | | | | | | This removes the duplication of code between Map and Set by placing it in a shared location, and will hopefully be a touch more efficient than using ArrayObject. In a followup patch, it will get faster, too. Note: As a bonus, this also fixed a few more test failures: forEach wasn't handling the object being changed during iteration. Task-number: QTBUG-68545 Change-Id: I8bf6f9c5b2de030a02ce27a23b8c1da431ffeda4 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Partial Proxy supportLars Knoll2018-06-251-0/+2
| | | | | | | | get, set and deleteProperty proxying is implemented, the others require some more changes in our engine. Change-Id: I4dd4b154b1a582f5e36cdc9429fa049fd37d5167 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add support for ReflectLars Knoll2018-06-211-0/+2
| | | | | | | | Implemented all methods in Reflect, only some smaller bugs left in there. Change-Id: I53d2304d0e59566aec64e200cd995e02afcfc33e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add the start of a Map from ES7Robin Burchell2018-06-011-2/+6
| | | | | | | | | | Like Set, for the time being, this is baseed on top of ArrayObject: two of them, one for keys, one for values. Again, this goes against the spirit of the spec (which requires nonlinear access), but having the API present is at least a start, and the implementation is easily changed. Change-Id: Idcf0ad8d92eb5daac734d52e8e2dd4c8e0dd5109 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add the start of a Set from ES7Robin Burchell2018-05-301-0/+4
| | | | | | | | | | Based on top of an ArrayObject for now, which is admittedly a bit of a cheat and not matching the "spirit" of the spec. OTOH, that makes it easy to write, and is presumably quite lightweight, so perhaps this is acceptable as a starting point. Change-Id: Ibc98137965b3e75635b960a2f88c251d45e6e837 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add Generator supportLars Knoll2018-05-031-0/+2
| | | | | | | | | | | | | Add support for ES6 generators. Those are currently always executed in the interpreter (we never JIT them), to simplify the initial implementation. Most functionality, except for 'yield *' expressions are supported. 'yield *' will have to wait until we support for(... of ...) Change-Id: I7c059d1e3b301cbcb79e3746b4bec346738fd426 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Implement StringIteratorLars Knoll2018-05-021-0/+2
| | | | | | | | Add support for String.prototype[Symbol.iterator] and the StringIterator object. Change-Id: I72c4f988e4f363be1af51f9cc5f8e83af43cd151 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add Array Iterator objects from ES6 (22.1.5)Robin Burchell2018-05-021-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And implement / expose them via: 22.1.3.4 - Array.prototype.entries() 22.1.3.13 - Array.prototype.keys() 22.1.3.29 - Array.prototype.values() 22.1.3.31 - Array.prototype[Symbol.iterator] Most tests for Array iterators now pass. At the same time, expose them on TypedArray's prototype: - 22.2.3.15 %TypedArray%.prototype.keys - 22.2.3.29 %TypedArray%.prototype.values - 22.2.3.6 %TypedArray%.prototype.entries - 22.2.3.31 %TypedArray%.prototype[Symbol.iterator] For TypedArray, test coverage improves a tiny bit (3 passing tests), but the vast majority fail as it seems like the object structure for TypedArray is currently incomplete as far as ES6 expects. It seems that ES6 expects the object structure to be: * %TypedArray% (inherits FunctionObject) (this is the TypedArray intrinsic object, and responsible for initializing the TypedArray instances) * All the TypedArray ctors (e.g. UInt8Array) These inherit %TypedArray%, and make a super call to it to do their work * %TypedArrayPrototype% (inherits Object) (this is the initial prototype for %TypedArray%) * All the ctors have their own separate instance of this * The instances also make use it So, for instance, a lot of the tests attempt to access the prototype like: var proto = Object.getPrototypeOf(Int8Array) var keys = proto.prototype.keys As ES6 expects Int8Array.prototype to be %TypedArray% (22.2.5), this expands to: Object.getPrototypeOf(%TypedArray%) which it expects to be %TypedArrayPrototype%. But since we have no intrinsic object, and the ctors inherit FunctionObject, we instead return the wrong prototype into 'var proto'. Change-Id: I5e1a95a0420ecb70a0e35a5df3f65557510c5925 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Partial Symbol supportLars Knoll2018-05-021-0/+2
| | | | | | | | | Added basic infrastructure to create symbols and convert them back to strings. In addition, storing and retrieving of symbol based properties in Objects works. Change-Id: I185f7aa46e7afa19db5a801102142892e03b7bf1 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QML: Make mapping of sequence object in JS optionalUlf Hermann2018-02-111-2/+8
| | | | | | | | | qv4sequenceobject.o is the largest single object in QtQml.so. This is probably due to template and macro explosion. Not everyone will want to pay this price to have Qt containers natively available in JS. Change-Id: I7dc64566a653c865d5c1b6e4f21a3a9089db100a Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Drop the qml-interpreter featureUlf Hermann2018-01-101-9/+4
| | | | | | | We cannot build QML without interpreter anymore. Change-Id: Ibc51240caa956132eef8753fa6c75939026930d5 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Merge remote-tracking branch 'origin/wip/new-backend' into devSimon Hausmann2017-11-211-0/+3
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qv4isel_moth.cpp src/qml/compiler/qv4jsir_p.h src/qml/jsruntime/qv4engine_p.h src/qml/jsruntime/qv4vme_moth.cpp tests/auto/qml/qml.pro Change-Id: Ia7b6ec24c7fcbcbb1786d9e798d2df294020ae37
| * Move ScopedCallData and ScopedStackFrame into a separate fileLars Knoll2017-09-011-0/+1
| | | | | | | | | | Change-Id: I9ae42aa7a811aa93fe0950725e9d253a0c5e8dba Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Move the Runtime codegen into it's own fileLars Knoll2017-07-031-0/+2
| | | | | | | | | | Change-Id: I3d09fc4b8aebe19acae0ba5a688491428a4af715 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Make qml-debug a proper featureUlf Hermann2017-11-081-1/+1
|/ | | | | Change-Id: Iea33ff0200f0bbf43953fedba030edf91d0f1417 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Move the EngineBase class into it's own header fileLars Knoll2017-05-191-0/+1
| | | | | Change-Id: Idf87618e4ebff99f3b3c269c950191d67a0182b2 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Update the alloca() support in QtQmlOswald Buddenhagen2017-05-101-0/+1
| | | | | | | | | | | | | | | | | qv4alloca_p.h dates from April 2013 and contained just the #includes, whereas the code in qtqmlglobal_p.h was introduced earlier this year in commit 87f016ea9eddc874d5cba7d79d0a487d5ef61761. This commit moves the macros to qv4alloca_p.h and centralizes the support there. This also updates the #include detection mechanism, by using QT_CONFIG(alloca_h) to determine which #include to use. See commit 98c1d516b7f7624f7fcd7b9046783e3903a6a42b in qtbase for more details. Task-number: QTBUG-59700 Started-by: Thiago Macieira <thiago.macieira@intel.com> Change-Id: Icd0e0d4b27cb4e5eb892fffd14b4b38005ce2ecb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Allow selecting armv7 as target architecture in qmlcachegenSimon Hausmann2017-02-011-2/+2
| | | | | Change-Id: I36e8f95e83ea3de6553145efc762e3bc46f60071 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-12-141-1/+2
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/qmltooling/qmldbg_debugger/qv4debugjob.cpp src/plugins/qmltooling/qmldbg_inspector/globalinspector.cpp src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp src/qml/qml/qqmlimport.cpp src/quick/items/context2d/qquickcontext2dtexture_p.h tools/qmleasing/splineeditor.h Change-Id: I8f6630fcac243824350986c8e9f4bd6483bf20b5
| * Start cleaning up the QmlContextWrapperLars Knoll2016-12-041-1/+2
| | | | | | | | | | | | | | | | | | The class should get merged with the QV4::QmlContext class. Simplify the cleanup by moving both classes into a common file. Change-Id: I0074da79701d5f41eb51681b70fcde85bfd45fc1 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-10-181-2/+7
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/qml/jsruntime/qv4variantobject.cpp src/qml/types/qquickworkerscript.cpp src/quick/scenegraph/util/qsgdefaultpainternode_p.h tools/qmljs/qmljs.cpp Change-Id: I876242714ec8c046238d8fd673a5ace2455b2b59
| * Make the Moth interpreter configurableLars Knoll2016-10-101-2/+7
| | | | | | | | | | | | Change-Id: I2b784820c4e39a7932f81bfee9ce78e01a2e96b5 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Make qv4util_p.h part of qmldevtoolsSimon Hausmann2016-09-011-1/+1
|/ | | | | | | Needed for QV4::BitVector in the isel Change-Id: I0ac79974790417238e619169fdc980d5d8b70ed0 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add QT_NO_QML_DEBUGGER to MODULE_DEFINES on -no-qml-debugUlf Hermann2016-08-031-5/+1
| | | | | | | | | | | If -no-qml-debug is set when building QtQml, we have to add QT_NO_QML_DEBUGGER when building application code, because this build option modifies the headers and linking an application built with QML debugging against a Qt built without is crashy. Change-Id: Ib150810f40deb98dcf398e3998401358a25155d9 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Replace debugger and profiler with stubs on -no-qml-debugUlf Hermann2016-07-281-1/+6
| | | | | Change-Id: I0f029d92366b3b508bf024c67b877a14bae27cd6 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* V4: Remove empty fileUlf Hermann2016-07-271-1/+0
| | | | | Change-Id: Ibae2334336f5cc4f16cd9c9d8d142ea4b013462b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add heaptrack support to qv4mm pool allocator.Milian Wolff2016-06-261-0/+4
| | | | | | | | | When you build qtdeclarative with CONFIG+=heaptrack then the allocations from the custom pool allocator can be traced with heaptrack. This works similar to the existing valgrind support. Change-Id: Ia988380415083aa1346c84c8c64b49ea3e17b7e2 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Move the Runtime API into it's own fileLars Knoll2016-04-111-0/+1
| | | | | | | | We will need to access the runtime API in the engine, so let's separate the API from the implementation details. Change-Id: Iaa638fa19cc3859fcd210963396a248e64fb6955 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* QML: make QmlContext::qml{Context,Scope} inlinable.Erik Verbruggen2016-04-051-0/+1
| | | | | | | | Both methods are called in QQmlPropertyCapture::registerQmlDependencies, which is called after every binding evaluation. Change-Id: Ic0c7ff96aa7d0be186d103de9d50eae19f42908b Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* V4 JIT: Switch all platforms to W^X for the ExecutableAllocator.Erik Verbruggen2016-01-151-2/+0
| | | | | | | | This also fixes makeWritable, which needs to work in order to add more c0d3 to used pages. Also finish the WinRT parts. Change-Id: Idaa4187b1ec256e65c881285a608f3a51fdbeebd Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* tvOS supportMike Krus2016-01-011-1/+1
| | | | | | Change-Id: If48e8bcf55781d1148e15ce19e07cfbe35d829d2 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
* Remove libdouble-conversionUlf Hermann2015-11-231-2/+0
| | | | | | | | We can use facilities in qtbase to convert doubles to strings now. This also makes the fix to QTBUG-47070 obsolete. Change-Id: I2f813164ff788b96281c3ffd37d8d2c65665de80 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Get rid of qv4qmlextensionsLars Knoll2015-06-151-2/+0
| | | | | | | | It only contained the proto for the value type wrapper. Instead just create it lazily, but reserve space on the js stack for it. Change-Id: I2301549b6dc4007bd5ac848e1dca25aafd583c4a Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Get rid of TypedValueLars Knoll2015-06-101-1/+0
| | | | | | | | Now that Managed inherits from Value, this class doesn't make sense anymore. Change-Id: I04e10f53ef305658d902bd0f1c7d7280068c0dc3 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Get rid of qv4value_inl_p.h and replace it by qv4typedvalue_p.hLars Knoll2015-04-241-1/+2
| | | | | | | | This is a cleaner separation and further reduces include dependencies in the definitions of our basic data structured. Change-Id: I18aa86cdea0c0dfbc16075d4d617af97e638811e Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Move memory management related functionality into it's own folderLars Knoll2015-03-021-2/+0
| | | | | | | | | Start moving the memory related functionality into it's own folder. This will simplify refactoring of the GC related functionality later on. Change-Id: I70ec6f512af7a7897625afb84d914c17572b0ccd Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Basic support for typed arraysLars Knoll2014-10-291-0/+2
| | | | | | | | | | | | | | | This implements most of the spec required for the Khronos typed array specification. It tries to follow ECMAScript 6 as closely as possible, but currently only implements a subset of the ECMAScript 6 specification. Addes a test script in tests/manual/v4 to test our implementation. Change-Id: I8ec63869500358e088b73240e1f37120ae3cf59a Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Implement DataViewLars Knoll2014-10-291-2/+4
| | | | | | | | The second class that is required for typed array support. Change-Id: Idc2dcec7c1eee541f76dc5ab1aea6057ba03cb93 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Implement ArrayBufferLars Knoll2014-10-291-2/+4
| | | | | | | | This is the first class required to support typed arrays in our JS engine. Change-Id: I0fe1e1ca430769c171912dda207cfae772e9b9db Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Remove redundant sse2 math flagsAllan Sandfeld Jensen2014-07-011-7/+0
| | | | | | | | | Qtbase already enables sse2 math by default now. This version is no longer needed and may actually hurt performance by triggering scheduling for pentium4. Change-Id: Ib3b6781fb0b92c1351344cc2d2f13101fa2b632b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Extend the QML bootstrap library by the IR buildersSimon Hausmann2014-04-231-7/+15
| | | | | | | | | | | | | This is among other things needed to fix the qml import scanner to detect dependencies from .js files correctly. The patch also fixes the use of Q_QML_EXPORT towards Q_QML_PRIVATE_EXPORT where appropriate and corrects the wrong include path for the double conversion code to actually be relative to the file it is included from. This worked by accident because of other include paths present in the build. Change-Id: I338583dad2f76300819af8ab0dae8e5724c84430 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Garbage collect member dataLars Knoll2014-04-041-0/+2
| | | | | | | | Move the allocated member data into the garbage collected area, so that we can avoid using malloc/free for it. Change-Id: I20625efa67ecd60238568742b74854b0c8cb2e3e Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Satellite profiler for V4Ulf Hermann2014-02-121-2/+4
| | | | | | | | Self-contained profiler for V4. By itself it doesn't have any connections to qqmlprofilerservice. Change-Id: I471a6119e07eab9c5f4712a16835be49c8886d1a Reviewed-by: Kai Koehne <kai.koehne@digia.com>