aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4instr_moth_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2018-06-14 10:12:20 +0200
committerLars Knoll <lars.knoll@qt.io>2018-06-21 19:43:32 +0000
commit99d8808bc5b85d54e8e735953a27a0c0c788f10e (patch)
tree9d4ea0fb0bcaee583c7b8510ca92d4b6c744a70c /src/qml/compiler/qv4instr_moth_p.h
parent6969aa5932f0eb7171dea2b4da39c21d1c09cc60 (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 <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/compiler/qv4instr_moth_p.h')
-rw-r--r--src/qml/compiler/qv4instr_moth_p.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/qml/compiler/qv4instr_moth_p.h b/src/qml/compiler/qv4instr_moth_p.h
index d4d630dfaf..85b30507a1 100644
--- a/src/qml/compiler/qv4instr_moth_p.h
+++ b/src/qml/compiler/qv4instr_moth_p.h
@@ -109,6 +109,9 @@ QT_BEGIN_NAMESPACE
#define INSTR_CallGlobalLookup(op) INSTRUCTION(op, CallGlobalLookup, 3, index, argc, argv)
#define INSTR_CallScopeObjectProperty(op) INSTRUCTION(op, CallScopeObjectProperty, 4, name, base, argc, argv)
#define INSTR_CallContextObjectProperty(op) INSTRUCTION(op, CallContextObjectProperty, 4, name, base, argc, argv)
+#define INSTR_CallWithSpread(op) INSTRUCTION(op, CallWithSpread, 4, func, thisObject, argc, argv)
+#define INSTR_Construct(op) INSTRUCTION(op, Construct, 3, func, argc, argv)
+#define INSTR_ConstructWithSpread(op) INSTRUCTION(op, ConstructWithSpread, 3, func, argc, argv)
#define INSTR_SetUnwindHandler(op) INSTRUCTION(op, SetUnwindHandler, 1, offset)
#define INSTR_UnwindDispatch(op) INSTRUCTION(op, UnwindDispatch, 0)
#define INSTR_UnwindToLabel(op) INSTRUCTION(op, UnwindToLabel, 2, level, offset)
@@ -139,7 +142,6 @@ QT_BEGIN_NAMESPACE
#define INSTR_CreateRestParameter(op) INSTRUCTION(op, CreateRestParameter, 1, argIndex)
#define INSTR_ConvertThisToObject(op) INSTRUCTION(op, ConvertThisToObject, 0)
#define INSTR_ToObject(op) INSTRUCTION(op, ToObject, 0)
-#define INSTR_Construct(op) INSTRUCTION(op, Construct, 3, func, argc, argv)
#define INSTR_Jump(op) INSTRUCTION(op, Jump, 1, offset)
#define INSTR_JumpTrue(op) INSTRUCTION(op, JumpTrue, 1, offset)
#define INSTR_JumpFalse(op) INSTRUCTION(op, JumpFalse, 1, offset)
@@ -235,6 +237,9 @@ QT_BEGIN_NAMESPACE
F(CallGlobalLookup) \
F(CallScopeObjectProperty) \
F(CallContextObjectProperty) \
+ F(CallWithSpread) \
+ F(Construct) \
+ F(ConstructWithSpread) \
F(SetUnwindHandler) \
F(UnwindDispatch) \
F(UnwindToLabel) \
@@ -265,7 +270,6 @@ QT_BEGIN_NAMESPACE
F(CreateRestParameter) \
F(ConvertThisToObject) \
F(ToObject) \
- F(Construct) \
F(Jump) \
F(JumpTrue) \
F(JumpFalse) \