aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4instr_moth.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2018-05-04 10:56:19 +0200
committerLars Knoll <lars.knoll@qt.io>2018-05-09 20:47:27 +0000
commit128485ccdb4f1c6f1bf1ebea85c5bed749cacd7a (patch)
tree350c795726910498f2a2ee7f9caa71018ae7ad5a /src/qml/compiler/qv4instr_moth.cpp
parent20a5d1ab3f47b4da6ba39143beaafedb26dbad6a (diff)
Add some basic support for for-of loops
The support is basically at the same level as for for-in at the moment. Currently unimplemented: * Destructuring * Proper lexical scoping * calling iterator.throw()/return() when required Change-Id: If193ce0b054c4315fc16b7e174334a31b2730dcf 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.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/qml/compiler/qv4instr_moth.cpp b/src/qml/compiler/qv4instr_moth.cpp
index 49d8455617..6ef4e79344 100644
--- a/src/qml/compiler/qv4instr_moth.cpp
+++ b/src/qml/compiler/qv4instr_moth.cpp
@@ -419,11 +419,9 @@ void dumpBytecode(const char *code, int len, int nLocals, int nFormals, int /*st
d << dumpRegister(reg, nFormals);
MOTH_END_INSTR(PopContext)
- MOTH_BEGIN_INSTR(ForeachIteratorObject)
- MOTH_END_INSTR(ForeachIteratorObject)
-
- MOTH_BEGIN_INSTR(ForeachNextPropertyName)
- MOTH_END_INSTR(ForeachNextPropertyName)
+ MOTH_BEGIN_INSTR(GetIterator)
+ d << iterator;
+ MOTH_END_INSTR(GetIterator)
MOTH_BEGIN_INSTR(DeleteMember)
d << dumpRegister(base, nFormals) << "[" << member << "]";