aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4instr_moth_p.h
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_p.h
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_p.h')
-rw-r--r--src/qml/compiler/qv4instr_moth_p.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/qml/compiler/qv4instr_moth_p.h b/src/qml/compiler/qv4instr_moth_p.h
index 2e3d118e52..546e8fd2de 100644
--- a/src/qml/compiler/qv4instr_moth_p.h
+++ b/src/qml/compiler/qv4instr_moth_p.h
@@ -118,8 +118,7 @@ QT_BEGIN_NAMESPACE
#define INSTR_PushWithContext(op) INSTRUCTION(op, PushWithContext, 1, reg)
#define INSTR_PushBlockContext(op) INSTRUCTION(op, PushBlockContext, 2, reg, index)
#define INSTR_PopContext(op) INSTRUCTION(op, PopContext, 1, reg)
-#define INSTR_ForeachIteratorObject(op) INSTRUCTION(op, ForeachIteratorObject, 0)
-#define INSTR_ForeachNextPropertyName(op) INSTRUCTION(op, ForeachNextPropertyName, 0)
+#define INSTR_GetIterator(op) INSTRUCTION(op, GetIterator, 1, iterator)
#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)
@@ -242,8 +241,7 @@ QT_BEGIN_NAMESPACE
F(PushWithContext) \
F(PushBlockContext) \
F(PopContext) \
- F(ForeachIteratorObject) \
- F(ForeachNextPropertyName) \
+ F(GetIterator) \
F(DeleteMember) \
F(DeleteSubscript) \
F(DeleteName) \