aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4instr_moth.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2018-02-10 19:02:34 +0100
committerLars Knoll <lars.knoll@qt.io>2018-04-25 17:49:15 +0000
commit219485d898556368a833576f1c55e210c1cf7189 (patch)
treec6f8faf247711f4ba36eb3605e5fc89f84c6aff6 /src/qml/compiler/qv4instr_moth.cpp
parentb59b727035c4c1a4d235432cc67e5d89d3a24cd3 (diff)
Add support for ES6 rest parameters
function foo(a, b, ...c) {...} now works correctly. Change-Id: Ie442a0e7cc5e9dc4156e56b348bba305cced8531 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/compiler/qv4instr_moth.cpp')
-rw-r--r--src/qml/compiler/qv4instr_moth.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/qml/compiler/qv4instr_moth.cpp b/src/qml/compiler/qv4instr_moth.cpp
index 362bc40b31..3a9cecdae0 100644
--- a/src/qml/compiler/qv4instr_moth.cpp
+++ b/src/qml/compiler/qv4instr_moth.cpp
@@ -454,6 +454,10 @@ void dumpBytecode(const char *code, int len, int nLocals, int nFormals, int /*st
MOTH_BEGIN_INSTR(CreateUnmappedArgumentsObject)
MOTH_END_INSTR(CreateUnmappedArgumentsObject)
+ MOTH_BEGIN_INSTR(CreateRestParameter)
+ d << argIndex;
+ MOTH_END_INSTR(CreateRestParameter)
+
MOTH_BEGIN_INSTR(ConvertThisToObject)
MOTH_END_INSTR(ConvertThisToObject)