aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4instr_moth_p.h
Commit message (Collapse)AuthorAgeFilesLines
...
| * Unify instruction namingLars Knoll2017-08-281-333/+333
| | | | | | | | | | | | | | | | Simplify the naming conventions, so that both the instruction struct and enum start with upper case letters. Change-Id: I60c5a95d729e0b68b5a40f7db0e8f90be5938032 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Change offsets to be integer basedLars Knoll2017-08-281-18/+18
| | | | | | | | | | | | | | | | | | This is big enough for generated bytecode, and gives more uniform sizing in our instructions (everything's an int), that will simplify moving over to a compressed instruction stream. Change-Id: Ieb13c5db84348f11c3297c08dca640bb9ec5f224 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Move line number information into a side tableLars Knoll2017-08-251-10/+3
| | | | | | | | | | | | | | | | | | Don't emit any Line instructions anymore, and instead store the info in a side table in the compiled data, where it can be looked up on demand. Change-Id: Idcaf3bf4ee4129fd62f9e717bf1277dc6a34fe19 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
| * Specialize possible direct calls to evalLars Knoll2017-08-251-0/+6
| | | | | | | | | | | | | | To avoid additional overhead on most function calls Change-Id: I2477b91fda6216b508c8331884a02b601f65590c Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
| * Cleanup object construction instructionsLars Knoll2017-08-251-37/+3
| | | | | | | | | | | | | | | | Remove the unused Create/Construct instructions, and rename the single remaining one to 'Construct'. Change-Id: I10163a15681156f37e34d21a05d195d3c22adcff Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
| * Add optimized branch instructions for comparisons with intsLars Knoll2017-08-251-0/+14
| | | | | | | | | | Change-Id: Ib5d5dc3b0e4a67b950ca9804edd3b6434fcdf9d1 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
| * Add optimized JmpCmpEq/NeNull instructionsLars Knoll2017-08-251-0/+12
| | | | | | | | | | | | | | for comparisons with null or undefined. Change-Id: I4a70d12ace501e4c4735b2ccfd6de19aeb9fef22 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
| * Add a LoadZero instructionLars Knoll2017-08-181-0/+5
| | | | | | | | | | | | | | as 0 is used quite often. Change-Id: I2c952ef077590f6e6cfe9aad50807f5e0f8686e4 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
| * Remove the Load/StoreScopedArgument instructionsLars Knoll2017-08-181-17/+3
| | | | | | | | | | | | | | They are not used anymore. Change-Id: I0cb3754899a30d5f88279ff31296fd73edf90a9a Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
| * Remove the now unused LoadThis instructionLars Knoll2017-08-181-5/+0
| | | | | | | | | | Change-Id: I2770ec4ef173cfa51c5ebd6600788de79684b953 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
| * Optimize byte codes for loading true/falseLars Knoll2017-08-181-0/+10
| | | | | | | | | | Change-Id: Ib726d55a32d868a4a547b0530b8b6dc6cd99a3cf Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
| * Add specialized instructions for loading undefined, null and intsLars Knoll2017-08-181-0/+16
| | | | | | | | | | Change-Id: Iab0b77328f5756972ef6eff82c0041b184290a32 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
| * Don't use a return value register for regular functionsErik Verbruggen2017-08-181-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | don't use the return value register for normal functions anymore. It's still needed for eval code and qml bindings that have an implicit return value, as the accumulator gets clobbered too easily in those cases. Also get rid of the exit block we used to generate. Adjust the control flow handlers to correctly unwind. This required adding some jump instructions that left the accumulator untouched (as it now holds the return value) and using those in handlers. Change-Id: I2ca1afaf7234cb632e5d26ba5b10ec3f11f50c93 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
| * More consistent naming of instructions and runtime methodsLars Knoll2017-08-101-57/+57
| | | | | | | | | | Change-Id: Ib8af10a48749b16c48d75c91ad215396b201a9d5 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Split StoreName into StoreNameStrict and StoreNameSloppyLars Knoll2017-08-101-3/+9
| | | | | | | | | | | | | | And adjust the name of the corresponding runtime functions. Change-Id: I4adf7b0e069d9b0dff9162cd1271dafc60be854b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Refactor context handlingLars Knoll2017-08-101-9/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * Remove unused lookup typesLars Knoll2017-08-101-16/+0
| | | | | | | | | | | | | | | | The indexed getters and setters haven't been used for a while and don't offer any performance benefits currently. Change-Id: Ifd5e1fab934e6e9940c4f1ad67f8850f04597504 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Create separate instructions to create both types of arguments objectsLars Knoll2017-08-101-3/+8
| | | | | | | | | | | | | | | | | | We know at compile time whether an arguments object should be strict or non strict (unmapped/mapped in ecmascript 6), use separate instructions for both cases. Change-Id: Ia23e68003beeda41a1f3597c0ba0980954c80ec7 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Load the this argument through LoadReg for simple callsLars Knoll2017-08-101-1/+4
| | | | | | | | | | Change-Id: Iac0fb5c955354c8137b551196278b822acc1b324 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Use the accumulator for the rhs of CmpJmp instructionsLars Knoll2017-08-081-6/+0
| | | | | | | | | | Change-Id: Ib7923863a88aacab93b06fa3c75d788fcfc0bf4e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Add instructions for <, <=, >, >=Lars Knoll2017-08-081-0/+32
| | | | | | | | | | Change-Id: Ibdd784507083da4c2cdc49208e842cc2e9c40da5 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Move the function to call into the accumulatorLars Knoll2017-08-081-1/+0
| | | | | | | | | | Change-Id: Ie84f3f029111b17d62912c653edc35b4cc2de026 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Fix bytecode dumping for argumentsErik Verbruggen2017-08-041-12/+14
| | | | | | | | | | Change-Id: Ic29284da0ed555186db0e969b3c2c1ba8a1e5eba Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * Keep order of arguments on the stackLars Knoll2017-08-041-2/+2
| | | | | | | | | | | | | | | | | | Don't reverse the arguments order when copying them. In addition, copy the this object as well, so we don't need to access the context anymore to access it. Change-Id: I38055c55387c4253cb53dd12fa69126840fa1270 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
| * Store arguments in the stack frame before the locals/tempsErik Verbruggen2017-08-031-37/+28
| | | | | | | | | | | | | | | | | | | | 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-71/+74
| | | | | | | | | | | | | | | | 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>
| * Use lookup instructions when calling propertiesLars Knoll2017-08-021-1/+0
| | | | | | | | | | | | | | Speeds up parts of v8-bench by 20%. Change-Id: Ic7e3d9103308b19bbe6bf1e40756b0f7f132d162 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
| * Add commonly used JumpCompare instructionsErik Verbruggen2017-08-021-0/+16
| | | | | | | | | | Change-Id: I00d4ed5d8b6ab30ee3459d1cc7a2737144474f8a Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * Inline integer fastpath for some instructionsErik Verbruggen2017-08-021-10/+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/+18
| | | | | | | | | | | | | | For subscript indices and the base of a property name lookup Change-Id: I20394aa5daf6e49137b66575e56d1f8937160a8d Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * Completely remove the Param struct and the scopes arrayErik Verbruggen2017-08-021-8/+8
| | | | | | | | | | | | | | | | Performance wise, his brings the interpreter on par with the "old" interpreter. Change-Id: If1c565e636d08b422cf405d26b085b36b409f409 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * Introduce an accumulator in the interpreter, and change instructionsErik Verbruggen2017-08-021-136/+32
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * Remove Moth::Param from the interpreter instructionsErik Verbruggen2017-07-191-233/+248
| | | | | | | | | | | | | | | | | | 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-7/+0
| | | | | | | | | | Change-Id: I948f76140abf36b4d7c42d5308cb7b670b1abd07 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Bring back captureRequired on scope/contest property loadingErik Verbruggen2017-07-041-52/+2
| | | | | | | | | | | | | | | | | | | | 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-28/+0
| | | | | | | | | | | | | | This includes the backing runtime methods. Change-Id: Ib8fb6091974794b11f732fadeb047a7347a50d66 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Switch over to new JS call setupLars Knoll2017-06-291-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-3/+3
| | | | | | | | | | Change-Id: I67f8397686a439cede37b52863d32dc194bee23f Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * Add constant table dumpingErik Verbruggen2017-06-291-0/+1
| | | | | | | | | | Change-Id: I1e3728481dab97b264f19f84edd602f9eae66983 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * Make debuggers print the instruction name instead of an intErik Verbruggen2017-06-291-1/+1
| | | | | | | | | | Change-Id: I969f3349d021d2dbc13d72318357d630dec1811a Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * Remove MoveConst and put constants in ParamErik Verbruggen2017-06-291-7/+0
| | | | | | | | | | Change-Id: I7a289dff5cacc23c238e79e44eb96c690691da3b Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * Add support for post increment/decrementErik Verbruggen2017-06-211-6/+20
| | | | | | | | | | Change-Id: Ie3f03a548105fe49d29e3d60bf823435f21b0340 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * Fix exception handlingLars Knoll2017-06-211-6/+7
| | | | | | | | | | | | | | | | Fix all exception handling related test failures in test262. Change-Id: Iba50238627c31705a4878b43abbb8f20f0ecee88 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
| * Fix ASAN issueErik Verbruggen2017-06-201-1/+1
| | | | | | | | | | Change-Id: I50250587ad6e88f6323721b69443a03674b923b9 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * Proper exception handlingLars Knoll2017-06-201-0/+11
| | | | | | | | | | | | | | | | 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/+16
| | | | | | | | | | | | | | These will simplify foreach and switch handling. Change-Id: I7fb67481d7d1b82b03c03fd0987b182ea9542c7a Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
| * Add bytecode dumperLars Knoll2017-06-191-0/+5
| | | | | | | | | | Change-Id: Ifd63cf604e66f46329472f82a46d37194a1b39eb Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
| * Add some meat to Codegen::Reference::load/storeLars Knoll2017-06-191-0/+8
| | | | | | | | | | | | | | | | Fill in code to emit proper Moth instructions for loading and storing References. Change-Id: I420ca0e805c98f9d8a304d178601ade41ae93b28 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* | Make qml-debug a proper featureUlf Hermann2017-11-081-1/+1
|/ | | | | Change-Id: Iea33ff0200f0bbf43953fedba030edf91d0f1417 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Silence -Wuninitialized warningAllan Sandfeld Jensen2017-06-131-0/+3
| | | | | | | Task-number: QTBUG-61089 Change-Id: I8b1fb03d040b04b3b14f371bf1a5ba8c2318054f Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>