aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4global_p.h
Commit message (Collapse)AuthorAgeFilesLines
...
* | | move locals over to be write barrier safeLars Knoll2017-03-091-1/+0
| | | | | | | | | | | | | | | Change-Id: I56b1dab62ff432273ee8549b0496bd0f3fc655ea Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Go through proper set() functions when writing to MemberDataLars Knoll2017-03-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | This is required, so we only have to add the write barrier in one place. Change-Id: I4e8bde823b30ad18f043312ac3f1ed46597b91a7 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Make every member of a Heap object aware of its offset inside the objectLars Knoll2017-03-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | This will allow adding a write barrier to those fields with manageable effort. Change-Id: I7d06d7ffccbcefe66e2524c64c962353c91c2766 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Refactor how we define Heap objectsLars Knoll2017-03-091-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Declare the type of Heap object in the Member() macro, instead of deducing it from templates. This allows us to encode the offset of the member in the second template argument to Pointer<> in a second step. Change-Id: I2cfb73785749d3fb991689b4e0554a72b3e5e13f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Unify mark handling for MemberData and ArrayDataLars Knoll2017-03-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Introduce a ValueArray class, that defines an array of Values at the end of a Heap Object. Change-Id: I00efbf6f5839a6687dd5bc5fc037ec8f06e0936e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | New mark table implementationLars Knoll2017-03-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Automatically generate a table containing the data where JS Values and pointers are in objects in the JS heap. This will allow making the GC mark phase a lot more efficient. A bit of a special hack is currently required for MemberData and ArrayData, as they have a variable length, and we need to read the size from the object. We keep backwards compatibility with the old markObjects() functions for now (calling them if they are defined). Some further work on QV4::String and in a few other places is required before we can get remove the compatibility. Change-Id: I78528ace67e886bdbe4a4330c9677c7fc9f08a33 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | FunctionObject: Mark name/length property configurableRobin Burchell2017-02-031-0/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In ES5, these were not configurable, but ES6 changed the behavior. For length, refer to: 9.2.4 (FunctionInitialize) 17 (ECMAScript Standard Built-in Objects): Unless otherwise specified, the length property of a built-in Function object has the attributes { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: true }. 19.2.2.1 Function.length 19.2.3.2 (Function.prototype.bind) 19.2.4.1 (Function instances, length) For name, refer to: 9.2.11 (SetFunctionName) This does regress test262 for ES5 for me a little, but improves our es6 test coverage a bit (~682 more tests pass, +1.5%). Change-Id: Icda7c9068dc3e6e4e4aebbb0d359868a30343013 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Convert more builtin functionsLars Knoll2017-01-251-0/+1
| | | | | | | | | | Change-Id: I2dc8797e2240fcfc4176cb08b982e3e98b879646 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Clarify JIT selection for 32-bit and 64-bit architecturesSimon Hausmann2017-01-041-4/+4
|/ | | | | | | | | | | | | | | Instead of relying on the somewhat "cryptic" ILP32 macro on x86/x86-64, we can also use the macro that the JIT generated code _really_ relies on, which is the size of pointers. For x32 those will be 4 despite Q_PROCESSOR_X86_64, and the JIT will end up disabled. For regular x86 and x86-64 it should get enabled. The same logic is applied to ARM32/ARM64 to disable the JIT once machines start showing up with ILP32 data model on ARM64. Change-Id: Id8dfb203c9b75e8ed5a61dcae28482f8f99be75f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
* V4: Help the C++ compiler to do more DSE by inlining more codeErik Verbruggen2016-11-291-0/+6
| | | | | | | | | | The JS stack allocation initializes the contents, but in most cases the caller will immediately store a value in that stack slot. When the allocation code is inlined, the compiler can use dead store elimination to remove the unnecessary initialization code. Change-Id: I0495417adc7c1c8764f845032611bd506a8b7df9 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-06-201-1/+1
|\ | | | | | | | | | | | | | | Conflicts: src/qml/jit/qv4targetplatform_p.h src/quick/accessible/qaccessiblequickitem_p.h Change-Id: Ic95075a5fad81ec997a61561bd65979dfa3b9d4d
| * Make some QNX only code Dinkum specificJames McDonnell2016-06-141-1/+1
| | | | | | | | | | | | | | The undefines won't be needed for QNX 7.0 with GNU libc++. Change-Id: Ibcea09aad54a956fc056ceaac5db6a0d53cd176c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Enable V4 JIT for aarch64Laszlo Agocs2016-02-011-1/+1
| | | | | | | | | | | | | | | | | | | | 64-bit ARM boards (f.ex. with Tegra X1) are becoming common and therefore enabling the JIT would be highly beneficial. Change-Id: I5ee46258151885194f93d2528edddd5f51dff964 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* | V4: Tweak "enable JIT" ifdefs.Erik Verbruggen2016-01-201-11/+16
| | | | | | | | | | | | | | | | | | | | | | - indentation, to make it readable - on arm64: only enable for Linux (but only after future testing!) - add CONFIG+=force-compile-jit handling so the JIT can be compiled/used even on platforms that don't officially support it (like iOS, where it works if you run from Xcode). This is done for debugging purposes. Change-Id: I8611ba409e10305f480463a16d88bc854b1c218a Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Updated license headersJani Heikkinen2016-01-191-14/+20
| | | | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: Ic36f1a0a1436fe6ac6eeca8c2375a79857e9cb12 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | V4: add Aarch64/ARM64 support.Erik Verbruggen2016-01-191-0/+2
| | | | | | | | | | | | | | | | | | | | This uses the JavaScriptCore assembler rev. 195098. It is tested on iOS (for which it is disabled, as it only allows marking pages as executable when running from Xcode). Testing on Linux will be done when hardware arrives. Change-Id: I650e15fec03c27d4b326a2d70863a89b85cfc5c3 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | WinRT: Enable JIT for x86/x64 target platformsMaurice Kalinowski2016-01-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This only works for Windows 10 and later. Setting the "Code Generation" capability in the manifest, WinRT applications can use JIT for Windows 10 Desktop. Update the Allocator in regards to this and also update the VirtualProtectFromApp section. When the engine gets initialized, check for marking an area as executable. If it fails, fallback to interpreter mode. This does not affect ARM platforms, as we do not have calling conventions yet. It is implicitly disabled as V4_ENABLE_JIT is not defined. [ChangeLog][WinRT] Enable JIT for x86/x64 targets on Windows 10 and later. Change-Id: Ie05add5263f71387c5ce98456b9bec86c6c07ceb 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>
* Add missing "We mean it" comments to private headers.Friedemann Kleint2015-10-061-0/+11
| | | | | | Task-number: QTBUG-48594 Change-Id: Ifc207938de7f0c8995fc712df92665f222612647 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* qml: Remove unneeded copy-ctor and copy-assignment operatorSérgio Martins2015-07-201-2/+0
| | | | | | | It's passed by value all over the place, so make it trivially-copyable Change-Id: I6710529b3d9a70c94f02c9c3e505658817de0898 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Get rid of qv4qmlextensionsLars Knoll2015-06-151-1/+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>
* V4: add JIT support for mips platforms (32-bit) and enable itJulien Brianceau2015-04-271-0/+2
| | | | | | | [ChangeLog][QtQml] Enabled Just-In-Time compilation for JavaScript on MIPS Change-Id: Idce070f29645760d6376767ef67e4592828c104d Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Cleanup some of the casting codeLars Knoll2015-03-201-1/+1
| | | | | | | | Get rid of value_cast, and move the Managed::as() method into Value. Change-Id: I440ac44ae77f4fda1a8a837383fe631f432f6532 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.4' into 5.5Frederik Gladhorn2015-03-171-2/+4
|\ | | | | | | Change-Id: I4c338a44c1d64c2d8e637971ab3ec6982c40a685
| * Disable JIT on x32 ABIDmitry Shachnev2015-03-041-2/+4
| | | | | | | | | | | | | | | | | | | | | | Linux x32 interface has a different ABI, and our JIT does not work there, so it should be disabled. See <http://en.wikipedia.org/wiki/X32_ABI>. Done-with: Adam Borowski <kilobyte@angband.pl> Change-Id: I0771e48a51f999a97b49abc01ee72621a5aaa6c3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Fix usage of QtQmlDevTools private headers on OSX with framework buildsSimon Hausmann2015-03-161-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously this module borrowed its private headers from QtQml, so that when writing QT += qmldevtools-private, you'd get the private headers from QtQml. This doesn't work when QtQml is built as a framework. A cleaner solution is to give this module its headers proper by letting syncqt create the forwarding headers correctly (and consequently also include them in make install). In order for this to work, the included headers themselves cannot include any headers from QtQml, which this patch also takes care of, through a centralized inclusion of qv4global_p.h. Change-Id: I9bb8337956a2774cfaca6b338369face6c6ee785 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* | Update copyright headersJani Heikkinen2015-02-121-7/+7
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I61120571787870c0ed17066afb31779b1e6e30e9 Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
* | Remove all remaining usages of ValueRefLars Knoll2015-01-231-1/+0
| | | | | | | | | | Change-Id: Icd76d3d03fac2e57530e55f8ec15b97109dcdcbc Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Refactor persistent valuesLars Knoll2015-01-161-1/+1
| | | | | | | | | | | | | | | | | | | | Use a page wise allocation mechanism for persistent values. This significantly reduces memory consumption of persistent values and also improves their performance a lot. Change-Id: I8499d2ca5bdd871e029f643ae605a94544558bb5 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Merge remote-tracking branch 'origin/5.4' into devSimon Hausmann2015-01-161-2/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/qml/jsruntime/qv4context_p.h src/qml/jsruntime/qv4debugging.cpp src/qml/jsruntime/qv4engine.cpp src/qml/jsruntime/qv4functionobject_p.h src/qml/jsruntime/qv4qobjectwrapper.cpp src/quick/scenegraph/shaders/visualization.frag tests/auto/qml/qjsengine/tst_qjsengine.cpp Change-Id: I492e8546c278f80a300a2129e9a29d861e144a30
| * Windows: Don't disable JITSérgio Martins2014-12-091-2/+2
| | | | | | | | | | | | | | | | [ChangeLog][QtQml][Windows] V4 JIT was re-enabled after it was disabled by mistake in 5.4.0. Task-number: QTBUG-43171 Change-Id: I16206e094c210b1eadbfef9ee04cf78d3a7dcebe Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Cleanup qv4executionengine headerLars Knoll2014-11-151-0/+10
| | | | | | | | | | Change-Id: I7312005a8d8e301ab4d8960c5f7579ace0a19a73 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Remove the remaining uses of Returned<T>Simon Hausmann2014-11-151-4/+0
| | | | | | | | | | Change-Id: I493b75365d3c6fbf6965986d73e7aa0b659ded67 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Ported most ExecutionEnginew::new* factory methods away from Returned<T>Simon Hausmann2014-11-121-0/+1
| | | | | | | | | | | | | | | | We don't need Returned<T> anymore with the QV4:: vs. Heap:: separation. Eliminating Returned<T> simplifies also some code. Change-Id: Ic2a9cd3c1a94f2ea37b539d3984d63997121c2b9 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Use Heap objects inside argumentsobject, arraybuffer and errorobjectLars Knoll2014-11-121-0/+8
| | | | | | | | | | Change-Id: Iad76a1351dcca1fd46303a1072540c23a8ef6722 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Store all data members in FunctionObject as heap dataLars Knoll2014-11-121-0/+1
| | | | | | | | | | Change-Id: Ic061baaf7f5ff08c5e6e7130abd6a650148d3d2d Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Use Heap objects as membersLars Knoll2014-11-111-1/+18
| | | | | | | | | | Change-Id: I4f447747480fb7e15975b810e2a8623acc9cde61 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Refactor ExecutionContextsLars Knoll2014-11-081-0/+3
| | | | | | | | | | | | | | Move the Data class out into the Heap namespace. Change-Id: I2b798deb53812a08155c92a0e6ef2dcd2ea137b8 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Begin moving the data out of Managed objectsLars Knoll2014-11-081-1/+4
| | | | | | | | | | | | | | | | | | | | | | We need to move the Data objects out of the Managed objects, to avoid lots of trouble because inner classes can't be forward declared in C++. Instead move them all into a Heap namespace. Change-Id: I736af60702b68a1759f4643aa16d64108693dea2 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Let markObjects() operate directly on HeapObjectsLars Knoll2014-11-041-0/+1
| | | | | | | | | | | | | | | | | | This decouples things a bit better and helps moving over to directly store heapobject pointers in other objects. Change-Id: I798f922e018b0a3ca6f8768e4a810187f34d82f6 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Cleanup header file dependenciesLars Knoll2014-11-041-0/+4
|/ | | | | Change-Id: Ibb4658576a98b53de2eac2474ce4d5b9eb83b6ae Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Update license headers and add new licensesJani Heikkinen2014-08-251-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: I84a565e2e0caa3b76bf291a7d188a57a4b00e1b0 Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* V4 JIT: enable the JIT when compiling with clang on ARM.Erik Verbruggen2014-07-241-0/+2
| | | | | | | | The macros that were used to detect Thumb2 support on the cores were gcc specific. Change-Id: I76959899b41f440d4b7ad7a5436059a3dc102111 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Get rid of ManagedRefLars Knoll2014-07-221-1/+0
| | | | | Change-Id: I6883fc5d8c5a13f1e61966c9f6e7bf0bedbfbc8a Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Get rid of all uses of ObjectRefLars Knoll2014-07-221-1/+0
| | | | | Change-Id: I705e2362dcda542f56826dadec6b0a6f15848788 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Remove the less often used Ref classesLars Knoll2014-07-221-3/+0
| | | | | Change-Id: I9ee531c903317a0f324671d98af1f967b684915c Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Get rid of StringRefLars Knoll2014-07-221-1/+0
| | | | | | | | Remove the Ref classes, as they won't be required anymore once Managed and Managed::Data are separated. Change-Id: Ic6bec2d5b4ecf2595ce129dbb45bbf6a385138a5 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Make sure JIT architectures lists are in syncDmitry Shachnev2014-07-071-2/+4
| | | | | | | | | We have two lists: in qv4global_p.h and qv4targetplatform_p.h. This commit blacklists OSes on x86 and x86_64 where JIT is not supported, improves support for FreeBSD and adds cross-references between these two files. Change-Id: Id3715a2ab717186e510a54e5a548dfa22120cd87 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2014-05-011-0/+5
|\ | | | | | | Change-Id: I996a85744753598bb48c7e0d7954049202f4f037
| * Extend the QML bootstrap library by the IR buildersSimon Hausmann2014-04-231-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>