diff options
author | Lars Knoll <lars.knoll@qt.io> | 2018-02-10 19:02:34 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2018-04-25 17:49:15 +0000 |
commit | 219485d898556368a833576f1c55e210c1cf7189 (patch) | |
tree | c6f8faf247711f4ba36eb3605e5fc89f84c6aff6 /src/qml/compiler/qv4instr_moth_p.h | |
parent | b59b727035c4c1a4d235432cc67e5d89d3a24cd3 (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_p.h')
-rw-r--r-- | src/qml/compiler/qv4instr_moth_p.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qml/compiler/qv4instr_moth_p.h b/src/qml/compiler/qv4instr_moth_p.h index df9be62672..8ce72f4942 100644 --- a/src/qml/compiler/qv4instr_moth_p.h +++ b/src/qml/compiler/qv4instr_moth_p.h @@ -128,6 +128,7 @@ QT_BEGIN_NAMESPACE #define INSTR_DefineObjectLiteral(op) INSTRUCTION(op, DefineObjectLiteral, 4, internalClassId, arrayValueCount, arrayGetterSetterCountAndFlags, args) #define INSTR_CreateMappedArgumentsObject(op) INSTRUCTION(op, CreateMappedArgumentsObject, 0) #define INSTR_CreateUnmappedArgumentsObject(op) INSTRUCTION(op, CreateUnmappedArgumentsObject, 0) +#define INSTR_CreateRestParameter(op) INSTRUCTION(op, CreateRestParameter, 1, argIndex) #define INSTR_ConvertThisToObject(op) INSTRUCTION(op, ConvertThisToObject, 0) #define INSTR_Construct(op) INSTRUCTION(op, Construct, 3, func, argc, argv) #define INSTR_Jump(op) INSTRUCTION(op, Jump, 1, offset) @@ -245,6 +246,7 @@ QT_BEGIN_NAMESPACE F(DefineObjectLiteral) \ F(CreateMappedArgumentsObject) \ F(CreateUnmappedArgumentsObject) \ + F(CreateRestParameter) \ F(ConvertThisToObject) \ F(Construct) \ F(Jump) \ |