summaryrefslogtreecommitdiff
path: root/src/qml/compiler/qv4instr_moth.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Use the accumulator for the rhs of CmpJmp instructionsLars Knoll2017-08-081-6/+6
| | | | | Change-Id: Ib7923863a88aacab93b06fa3c75d788fcfc0bf4e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add instructions for <, <=, >, >=Lars Knoll2017-08-081-0/+16
| | | | | Change-Id: Ibdd784507083da4c2cdc49208e842cc2e9c40da5 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Move the function to call into the accumulatorLars Knoll2017-08-081-1/+1
| | | | | Change-Id: Ie84f3f029111b17d62912c653edc35b4cc2de026 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix Windows/MSVC buildErik Verbruggen2017-08-041-1/+1
| | | | | Change-Id: I066d7df19bcb6411f8f3c317ba4aacbd24774077 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix bytecode dumping for argumentsErik Verbruggen2017-08-041-61/+56
| | | | | Change-Id: Ic29284da0ed555186db0e969b3c2c1ba8a1e5eba Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Store arguments in the stack frame before the locals/tempsErik Verbruggen2017-08-031-24/+4
| | | | | | | | | | All escaping arguments will still be loaded/stored from/to the CallData, but this is not the common case. In a subsequent patch we can make the caller prepare the stack frame, and for the common case we don't even need to copy arguments around. Change-Id: I3fbb6fe575a564d05a9fd5dcc0c8f4129eac3bc2 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Rename a number of types from Temp(orary) to StackSlotErik Verbruggen2017-08-031-2/+2
| | | | | | | | As a preparation to also store arguments on the stack, just like the temporaries. Change-Id: If3a6ed56930e29ad77c992811065bb32ee2d030c Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add commonly used JumpCompare instructionsErik Verbruggen2017-08-021-1/+9
| | | | | Change-Id: I00d4ed5d8b6ab30ee3459d1cc7a2737144474f8a Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Inline integer fastpath for some instructionsErik Verbruggen2017-08-021-6/+0
| | | | | Change-Id: Ibf62e8233c58d31d0a309c5850857c4a0a14b0c4 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Allow for more values to be in the accumulatorErik Verbruggen2017-08-021-0/+12
| | | | | | | For subscript indices and the base of a property name lookup Change-Id: I20394aa5daf6e49137b66575e56d1f8937160a8d Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Introduce an accumulator in the interpreter, and change instructionsErik Verbruggen2017-08-021-100/+86
| | | | | | | | | | | | This reduces the number of stores to the stack (for which we need a write-barrier in the future) by keeping the last calculated value in the accumulator register (which is a local variable). In the future we might want to collapse certain common instruction patterns into a super-sized instruction. Change-Id: I02ebed2db957765e994c8f939bf7585894881deb Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix various signed/unsigned warningsErik Verbruggen2017-08-021-1/+1
| | | | | Change-Id: I9f4a5a8470c1abc6b07a28c71fdad0d208e1fea1 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove Moth::Param from the interpreter instructionsErik Verbruggen2017-07-191-15/+40
| | | | | | | | | The Param struct is now internal to the interpreter loop. It can be removed in a second step so we can directly access constants/temporaries/locals/arguments. Change-Id: I47ecbfe7508f352a8f212af48461dc92b35f4695 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Remove unused interpreter instructionErik Verbruggen2017-07-111-4/+0
| | | | | Change-Id: I948f76140abf36b4d7c42d5308cb7b670b1abd07 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix disabling fast lookups for QMLErik Verbruggen2017-07-071-1/+1
| | | | | | | | | This was accidentally enabled because we previously generated the lookups in the isel (so second part of code generation), where we now do it in codegen itself (so early on). Change-Id: I591fbb7a26d94b985c934c5ffca0068b80fac58a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Bring back captureRequired on scope/contest property loadingErik Verbruggen2017-07-041-24/+0
| | | | | | | | | | This is needed to properly register permanent/temporary dependencies This patch also removes related interpreter instructions that should have changed, but were not used. Change-Id: Ie53c4611766680734c02e328b7f2c752cae150e0 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove interpreter instructions we can't generate anymoreErik Verbruggen2017-06-301-16/+0
| | | | | | | This includes the backing runtime methods. Change-Id: Ib8fb6091974794b11f732fadeb047a7347a50d66 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Beautify SetExceptionHandler offset printingErik Verbruggen2017-06-291-1/+4
| | | | | Change-Id: Ie17b02053894e2f0f72b04304ed091084472fcdd Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Switch over to new JS call setupLars Knoll2017-06-291-5/+6
| | | | | | | | | | | | | | | | Differences: - push parameters on the stack, including space for CallData members - call instructions calculate the argument start - use temp space above the calldata to evaluate arguments - fewer temporaries are needed when a call is done while generating the arguments of another call - when calling the function, the js stack space above the callData is not used, allowing for optimizations in the future - Array and ObjectLiteral use the same mechanism Change-Id: Id100fa06f12cc9d941b0f90b0b81b8270a8e4f5d Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Rename push instruction to InitStackFrameErik Verbruggen2017-06-291-2/+2
| | | | | Change-Id: I67f8397686a439cede37b52863d32dc194bee23f Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add constant table dumpingErik Verbruggen2017-06-291-2/+10
| | | | | Change-Id: I1e3728481dab97b264f19f84edd602f9eae66983 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove MoveConst and put constants in ParamErik Verbruggen2017-06-291-4/+0
| | | | | Change-Id: I7a289dff5cacc23c238e79e44eb96c690691da3b Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Make dumped bytecode more readableErik Verbruggen2017-06-221-6/+9
| | | | | | | | - change temp/local/formal printing to match the old IR style - add some commas to CallBuiltinDefineObjectLiteral Change-Id: I24b945512969ac1a829e69e3153c433b09215305 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Encode numeric literals as int when possibleErik Verbruggen2017-06-221-3/+13
| | | | | Change-Id: I5ecc406f06a193b470eb9ac376da6b9f752d01cb Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Initialize elided array elements with emptyErik Verbruggen2017-06-211-6/+7
| | | | | | | | ... instead of undefined. Also massages the bytecode dumper a bit to make debugging easier. Change-Id: Ief1a9330196b20e97717174a945cd5a6432e05ce Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Throw syntax error if arguments or eval are used as lvalues in strict modeLars Knoll2017-06-211-0/+1
| | | | | Change-Id: I4c46537e3a4f3c2c22efea323dc8a95c1078c75f Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Add support for post increment/decrementErik Verbruggen2017-06-211-4/+12
| | | | | Change-Id: Ie3f03a548105fe49d29e3d60bf823435f21b0340 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix exception handlingLars Knoll2017-06-211-2/+3
| | | | | | | | Fix all exception handling related test failures in test262. Change-Id: Iba50238627c31705a4878b43abbb8f20f0ecee88 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Proper exception handlingLars Knoll2017-06-201-0/+7
| | | | | | | | Implement exception handling, and make it conformant with the spec. Change-Id: I6d8222617180f96f628f18e11444488e50e5c043 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Add JumpStrict(Not)Equal instructions to the interpreterLars Knoll2017-06-201-0/+8
| | | | | | | These will simplify foreach and switch handling. Change-Id: I7fb67481d7d1b82b03c03fd0987b182ea9542c7a Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Dump absolute addresses for jumpsLars Knoll2017-06-201-4/+10
| | | | | Change-Id: I503496c66fab067cb28f360cd10c9da5682384ab Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Implement support for conditional expressionsLars Knoll2017-06-201-3/+13
| | | | | | Change-Id: Ifcd57713e1cfa9514d3955e26f739a359cdaa8e5 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add bytecode dumperLars Knoll2017-06-191-0/+432
| | | | | Change-Id: Ifd63cf604e66f46329472f82a46d37194a1b39eb Reviewed-by: Erik Verbruggen <erik.verbruggen@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>
* 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>
* 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>
* Restructure source codeLars Knoll2013-08-081-0/+56
Move the v4 engine classes from a subdir of qml/qml into two subdirs (compiler and jsruntime) of the qml module Remove an unsued qv4syntaxchecker class, and move the moth code directly into compiler. Change-Id: I6929bede1f25098e6cb2e68087e779fac16b0c68 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>