aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4vme_moth_p.h
Commit message (Collapse)AuthorAgeFilesLines
* Remove tracing JIT infrastructureUlf Hermann2019-04-291-2/+0
| | | | | | | | The tracing JIT won't be finished. Therefore, remove the parts that have already been integrated. Change-Id: If72036be904bd7fc17ba9bcba0a317f8ed6cb30d Reviewed-by: Erik Verbruggen <erik.verbruggen@me.com>
* V4: Add IR that can use traced information to JITErik Verbruggen2019-03-041-0/+2
| | | | | | | | | | | This is the in a series of patches for a JIT that can use traced information to generate better code. In this patch, traced information is not used/stored yet. It allows testing the basic infrastructure without trying to do any optimizations, therefore making it easier to debug, test, and review. Change-Id: I589bdadf731c36542331abe64e1b39e305b6723e Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Refactor initialization code for JS stack framesLars Knoll2018-07-031-7/+0
| | | | | | | | | Move code into qv4stackframe_p.h, so that it can be re-used from different places. Clean up VME::exec and the generatorfunctions using this. Change-Id: Ib4f7eceeb5f55d98dd6ccf2584d13a3b864caea1 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Smaller refactoring of VME::exec() to preapre for upcoming changesLars Knoll2018-07-031-1/+2
| | | | | | | | | We'll need a more flexible interface here to support derived constructors properly. There's also quite some code in the generator functions that could benefit from some cleanups. Change-Id: I951b5d2171efa80d52fd6b0155f8f2c78af2f3b5 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Implement support for new.targetLars Knoll2018-07-031-1/+1
| | | | | | | | | Support the new.target meta property in the codegen, and add support for passing the newtarget into the constructor vtable methods and the execution context. Change-Id: I62ea58e5e92d894035a76e35776203e9837c383b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Minor cleanup with bytecode pointer typesSimon Hausmann2018-05-281-1/+1
| | | | | | | | | | | | Even though we consider the bytecode to be a sequence of unsigned bytes, we store it as const char * (so unsigned except on arm) everywhere, because that makes it convenient to work with QByteArray's constData(). By using const char * consistently we can get rid of at least one more reinterpret_cast. Change-Id: I7a803e4201381c39eec2fdc6497d9bf36a1c2b6b Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Move interpreter loop into it's own functionLars Knoll2018-05-021-0/+1
| | | | | | | This will be required to make Generators work properly Change-Id: I1262d8694674ea3436f496fae30668a939327ab7 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Drop the qml-interpreter featureUlf Hermann2018-01-101-2/+0
| | | | | | | We cannot build QML without interpreter anymore. Change-Id: Ibc51240caa956132eef8753fa6c75939026930d5 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Cut out one more C++ layer when doing JS function callsLars Knoll2017-11-131-3/+11
| | | | | Change-Id: I0e2ac30b7e6d77fe41deb84a97b0a7f220437c6a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Use the context member in CallDataLars Knoll2017-09-011-1/+1
| | | | | | | | Store the current context in the context member instead of passing it along as arguments. Change-Id: If3dd0d32eddb2a02bcbf65fe6e8d15142403170e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Get rid of the FunctionObject parameter to VME::exec()Lars Knoll2017-09-011-1/+1
| | | | | Change-Id: I5b833d1f76899a5b8fceb0f4fc109b77b1b431fc Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Always create a valid CallData object for interpreter callsLars Knoll2017-08-101-1/+1
| | | | | | | | This will allow removing a few more special cases and to simplify the code further. Change-Id: I3a958e9f68e3c103ea4f2ee6825f893e5931b11d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Refactor context handlingLars Knoll2017-08-101-1/+1
| | | | | | | | | | | | | | | Fix the push/pop context instructions to not modify the JS stack anymore, as that can cause conflicts with the VME (and was an ugly hack in any case). Instead, these instructions not return the old context, that is then stored in a temporary. Get rid of Engine::current and Engine::currentContext. The StackFrame structures do now contain the only and authoritive data. This finally gives us a nice setup where we create and destroy frames on the stack when entering/leaving functions. Change-Id: If161e3e941f59865c47ecfe1e094faf62b52bfa0 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Introduce a JS stack frame that corresponds to the C++ stack frameLars Knoll2017-08-101-1/+1
| | | | | | | | The frame currently contains the function itself and the current context. Change-Id: I7d3402627fbc90e860a7bdc277585f365f5b4cb5 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* No need to pass the Engine pointer to VME::exec()Lars Knoll2017-08-031-1/+1
| | | | | Change-Id: I1e43305e26833a6d9b714e89f59ccead6bd12605 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Get rid of the compilation unit related members in ExecutionContextLars Knoll2017-08-031-1/+1
| | | | | | | | | | And change the signature for VME::exec to take the QV4::Function that should be executed. This is in preparation to being able to run functions that will not need to allocate an execution context on their own. Change-Id: I34538a8723006f4ec24583805e88a66e750100c3 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Lower the maximum call depth for debug buildsErik Verbruggen2017-06-291-3/+0
| | | | | | | | Also merge VME::exec and VME::run together, so there is one less frame on the stack. Change-Id: I7268e0b1f16fc75766c0c9b7b5e14b9885e6fe7c Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Optimizations to the generated byte codeLars Knoll2017-05-191-9/+1
| | | | | | | | | | | | | | | | | | | Cut the size of the generated byte code in half, by storing parameters in a more compact form and always storing the instruction type in the instruction. We can still used computed goto's for a fast interpreter, by looking up the jump point for the next instruction in the jump table. Another advantage is that the byte code is now platform independent (modulo endianness). The change comes with a 3% performance impact on x86_64, which is acceptable considering the size savings on the bytecode. Change-Id: I37de3e1f94611987a85e65ea86536583aa965d6d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Make the Moth interpreter configurableLars Knoll2016-10-101-0/+3
| | | | | | Change-Id: I2b784820c4e39a7932f81bfee9ce78e01a2e96b5 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* 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>
* 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>
* 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>
* Change signature or runtime methods to take an engine pointerLars Knoll2014-11-121-2/+2
| | | | | | | | | This makes a lot more sense in the long term and is the more maintainable solution, once the GC starts moving objects around in memory Change-Id: I8f327c0f5b5b0af38c5fe1a217852ee8c4a5c2fc 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>
* Clean up our internal namespacesLars Knoll2014-02-231-2/+2
| | | | | | | | QQmlJS::MASM -> QV4::JIT QQmlJS::V4IR -> QV4::IR Change-Id: I707e8990459114a699c200fe3c22cec3c8df1afc Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Remove two unused parameters from VME::run()Lars Knoll2014-02-071-2/+1
| | | | | | | | These parameters are not used outside the function itself anymore, so we can safely remove them. Change-Id: I1694481c05a9927fc78a59ffb7fec43a88e85ac8 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* CleanupsLars Knoll2014-01-311-1/+1
| | | | | | | | | | Remove SafeValue, it was used to port over to an exact GC. Since we now have that, we can now safely merge it with QV4::Value again. Also rename SafeString to StringValue for better naming consistency. Change-Id: I8553d1bec5134c53996f6b0d758738a0ec8a2e4d Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Implement new exception handling for mothLars Knoll2013-10-291-1/+1
| | | | | | | | | Add the required instructions and check for exceptions in the engine before storing any results. Change-Id: Ibfaf904d659859e8012920270825211ba202c63d Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Remove some more uses of QV4::ValueLars Knoll2013-10-021-1/+1
| | | | | | | All remaining uses should be GC safe now. Change-Id: I05c962de6ab896f108f70caa1bf937a24e67bfe1 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Change calling convention in JIT to use ReturnedValueSimon Hausmann2013-09-181-2/+2
| | | | | | | This simplifies the masm backend as well and should be faster. Change-Id: I64ad5d9ee1b6caca950471e3aec4ef19d7503e62 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Trivial compile fix for tools/v4/v4Simon Hausmann2013-08-081-1/+1
| | | | | Change-Id: Idc17c13630d3684d9ae280632da1d1403700838e Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* The Moth VME is actually part of the runtime, not the compilerLars Knoll2013-08-081-0/+76
Change-Id: Idcb7a6b6157c58e33192f86750ded487c0e75b9f Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>