diff options
author | Lars Knoll <[email protected]> | 2018-06-14 10:12:20 +0200 |
---|---|---|
committer | Lars Knoll <[email protected]> | 2018-06-21 19:43:32 +0000 |
commit | 99d8808bc5b85d54e8e735953a27a0c0c788f10e (patch) | |
tree | 9d4ea0fb0bcaee583c7b8510ca92d4b6c744a70c /src/qml/compiler/qv4bytecodehandler.cpp | |
parent | 6969aa5932f0eb7171dea2b4da39c21d1c09cc60 (diff) |
Add support for function calls with spread
Function calls with thread are modelled by pushing
an empty value in front of every argument that
requires spreading. The runtime methods callWithSpread
and constructWithSpread then take care of spreading
out the arguments.
Change-Id: Ie877c59d3d9d08fc5f20d7befb7153c7b716bf30
Reviewed-by: Simon Hausmann <[email protected]>
Diffstat (limited to 'src/qml/compiler/qv4bytecodehandler.cpp')
-rw-r--r-- | src/qml/compiler/qv4bytecodehandler.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/qml/compiler/qv4bytecodehandler.cpp b/src/qml/compiler/qv4bytecodehandler.cpp index 3e4844a1ac..8d1ac0bfd9 100644 --- a/src/qml/compiler/qv4bytecodehandler.cpp +++ b/src/qml/compiler/qv4bytecodehandler.cpp @@ -263,6 +263,15 @@ std::vector<int> ByteCodeHandler::collectLabelsInBytecode(const char *code, uint COLLECTOR_BEGIN_INSTR(CallContextObjectProperty) COLLECTOR_END_INSTR(CallContextObjectProperty) + COLLECTOR_BEGIN_INSTR(CallWithSpread) + COLLECTOR_END_INSTR(CallWithSpread) + + COLLECTOR_BEGIN_INSTR(Construct) + COLLECTOR_END_INSTR(Construct) + + COLLECTOR_BEGIN_INSTR(ConstructWithSpread) + COLLECTOR_END_INSTR(ConstructWithSpread) + COLLECTOR_BEGIN_INSTR(SetUnwindHandler) addLabel(code - start + offset); COLLECTOR_END_INSTR(SetUnwindHandler) @@ -355,9 +364,6 @@ std::vector<int> ByteCodeHandler::collectLabelsInBytecode(const char *code, uint COLLECTOR_BEGIN_INSTR(ToObject) COLLECTOR_END_INSTR(ToObject) - COLLECTOR_BEGIN_INSTR(Construct) - COLLECTOR_END_INSTR(Construct) - COLLECTOR_BEGIN_INSTR(Jump) addLabel(code - start + offset); COLLECTOR_END_INSTR(Jump) |