aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4instr_moth.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2018-05-14 14:12:33 +0200
committerLars Knoll <lars.knoll@qt.io>2018-05-14 19:32:42 +0000
commitc4ef0d6e4b5bb7de7b0ab08928d693988a60b25d (patch)
tree0ff9682886da081c2d8e89becfd90cfb7083540d /src/qml/compiler/qv4instr_moth.cpp
parentd8eade23bc4fdd7040204f4374ef26975b94ea0a (diff)
Call iterator.return when required in destructuring assignments
Array destructuring assignments require a call to iterator.return if the iterator hasn't been exhausted during destructuring. Change-Id: I39fe4bc01bef6fb2ad3bda92caf6779fbbddc8e2 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.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/qml/compiler/qv4instr_moth.cpp b/src/qml/compiler/qv4instr_moth.cpp
index 7d8a1774f1..5e7fe816b2 100644
--- a/src/qml/compiler/qv4instr_moth.cpp
+++ b/src/qml/compiler/qv4instr_moth.cpp
@@ -434,9 +434,13 @@ void dumpBytecode(const char *code, int len, int nLocals, int nFormals, int /*st
MOTH_END_INSTR(GetIterator)
MOTH_BEGIN_INSTR(IteratorNext)
- d << value;
+ d << dumpRegister(value, nFormals);
MOTH_END_INSTR(IteratorNext)
+ MOTH_BEGIN_INSTR(IteratorClose)
+ d << dumpRegister(done, nFormals);
+ MOTH_END_INSTR(IteratorClose)
+
MOTH_BEGIN_INSTR(DestructureRestElement)
MOTH_END_INSTR(DestructureRestElement)