diff options
author | Lars Knoll <lars.knoll@qt.io> | 2018-05-14 10:22:09 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2018-05-14 19:32:29 +0000 |
commit | 16288498cf0e1eb389ac3acdce86eb74cc69e67a (patch) | |
tree | 32ffcf8899a40d8bf076b6ffb58823991dac1978 /src/qml/compiler/qv4instr_moth_p.h | |
parent | b9311cc01da09f7f736850f500113f3e576c21a9 (diff) |
Implement support for destructuring of rest elements
"var [x, ...y] = array" now works as intended.
Change-Id: I45238f27f468d0b0e14dc0e931c55c4f40043690
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 de01b808e9..670d977a57 100644 --- a/src/qml/compiler/qv4instr_moth_p.h +++ b/src/qml/compiler/qv4instr_moth_p.h @@ -123,6 +123,7 @@ QT_BEGIN_NAMESPACE #define INSTR_PopContext(op) INSTRUCTION(op, PopContext, 1, reg) #define INSTR_GetIterator(op) INSTRUCTION(op, GetIterator, 1, iterator) #define INSTR_IteratorNext(op) INSTRUCTION(op, IteratorNext, 1, returnUndefinedWhenDone) +#define INSTR_DestructureRestElement(op) INSTRUCTION(op, DestructureRestElement, 0) #define INSTR_DeleteMember(op) INSTRUCTION(op, DeleteMember, 2, member, base) #define INSTR_DeleteSubscript(op) INSTRUCTION(op, DeleteSubscript, 2, base, index) #define INSTR_DeleteName(op) INSTRUCTION(op, DeleteName, 1, name) @@ -251,6 +252,7 @@ QT_BEGIN_NAMESPACE F(PopContext) \ F(GetIterator) \ F(IteratorNext) \ + F(DestructureRestElement) \ F(DeleteMember) \ F(DeleteSubscript) \ F(DeleteName) \ |