aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4global_p.h
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* | Remove unneeded ;Albert Astals Cid2014-04-251-2/+2
|/ | | | | | | Warnings returned by pedantic Change-Id: Ic2caba475db9064bf302790299d92a217436d0ee Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* V4 JIT: enable JIT on win64.Erik Verbruggen2014-03-081-1/+1
| | | | | Change-Id: I640d507c33fd4c4df6d6284b473df5cea9e5c4b4 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Make the Ref classes not template basedLars Knoll2014-02-071-5/+6
| | | | | | | | | | Move to a class hierarchy that mirrors the main classes. This will allow moving functionality over into the Ref classes, as the current Managed classes become mainly something that holds the data. This is required to make objects movable by the GC. Change-Id: I4ca88ab0e5d8c88c8dc56d51937990500a33e0d9 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Rename Referenced to ManagedRefLars Knoll2014-02-071-6/+5
| | | | | | | | | | First step of removing the templates here and turning this into a class hierarchy. This is required, so we can move all member methods into the Ref classes and make objects movable during GC. Change-Id: Ie14af07fd3e72a7d84a528d0042189ff12ba21bb Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Move ValueRef into qv4value_p.hLars Knoll2014-01-311-0/+4
| | | | | | | The ref class belongs logically together with the value. Change-Id: I40c0908715cbc8b2a5c51d2544cb06fcd8e25365 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Move the vtable pointer from the object to the internal classLars Knoll2013-12-041-0/+2
| | | | | | | | This saves one pointer per object, and willmake other optimizations easier in the future. Change-Id: I1324cad31998896b5dc76af3c8a7ee9d86283bfe Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix build on WinRTAndrew Knight2013-11-061-1/+1
| | | | | | | | Disable JIT and avoid unsupported functions under WinRT. Also add MSVC's ARM flag to the double conversion white list. Change-Id: I22ec340a20b113fdeefb802ac61812f78a527895 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Enable JIT for WinCE.Sérgio Martins2013-11-041-2/+2
| | | | | | | | Demos work, 120 unit-tests pass, some failures unrelated to JIT. Change-Id: I641d31cc08dc7961fa46d7b95666178699317f61 Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix MSVC2013 compilationYuchen Deng2013-10-211-0/+2
| | | | | | Change-Id: I79b50e786f46c9a15963f09158c18871c95fe093 Reviewed-by: Peter Kümmel <syntheticpp@gmx.net> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix ARM thumb2 mode detectionSimon Hausmann2013-10-171-1/+5
| | | | | | | | | __TARGET_ARCH_THUMB may not always be defined, but __thumb2__ for example is also a good indicator that we can generated and run thumb2 code and thus enable the JIT. Change-Id: I987d0af5883d9bb844c4c99a0691a12aedc94ff5 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix build on ARM in ARM mode (instead of thumb2)Simon Hausmann2013-10-171-0/+31
| | | | | | | | | | We don't support the traditional ARM assembler (yet), only JIT on thumb2. In order for us to reliably check that, we have to wait until the pre-processor runs, which this patch achieves by moving all JIT enable/disable decisions into qv4global_p.h Change-Id: I7eff5b4fbf1cd26297a08dee16984ad867358113 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Change exception handling APISimon Hausmann2013-10-021-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes the exception handling API in the engine slightly, encapsulating any use of direct throw statements and catch blocks with concrete types. In the future we need to be able to change the way these are implemented, in order to ensure that the correct stack unwinding code is triggered for throw and re-throw. This patch separates the C++ exception object thrown from the V4 exception (that includes value, throwing context pointer) and stores the latter inside the engine. In order for that to compile, ExecutionEngine::StackTrace and StackFrame had to move into the QV4 namespace directly. In addition the syntax for catching exceptions changes from try { ... } catch (QV4::Exception &ex) { ex.accept(context); QV4::ScopedValue exceptionValue(scope, ex.value()); } to try { ... } catch (...) { QV4::ScopedValue exception(scope, context->catchException()); } Context::catchException() checks if there's a "current" exception in the engine, and if not assumes that we caught an unrelated exception and consequently re-throws. partiallyUnwind() is also gone and replaced with rethrowException(), in order to encapsulate the re-throw. Lastly, in the future nesting try/catch blocks isn't going to be possible due to limitations in the common C++ ABI with regards to foreign exceptions. Change-Id: Ic81c75b057a2147e3176d8e0b4d326c14278b47d Reviewed-by: Lars Knoll <lars.knoll@digia.com>