aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4vme_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/jsruntime/qv4vme_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/jsruntime/qv4vme_moth.cpp')
-rw-r--r--src/qml/jsruntime/qv4vme_moth.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4vme_moth.cpp b/src/qml/jsruntime/qv4vme_moth.cpp
index 88d859eef5..fae917dbb5 100644
--- a/src/qml/jsruntime/qv4vme_moth.cpp
+++ b/src/qml/jsruntime/qv4vme_moth.cpp
@@ -981,6 +981,10 @@ QV4::ReturnedValue VME::exec(const FunctionObject *fo, const Value *thisObject,
acc = Runtime::method_createUnmappedArgumentsObject(engine);
MOTH_END_INSTR(CreateUnmappedArgumentsObject)
+ MOTH_BEGIN_INSTR(CreateRestParameter)
+ acc = Runtime::method_createRestParameter(engine, argIndex);
+ MOTH_END_INSTR(CreateRestParameter)
+
MOTH_BEGIN_INSTR(ConvertThisToObject)
Value *t = &stack[CallData::This];
if (!t->isObject()) {