diff options
author | Lars Knoll <lars.knoll@qt.io> | 2018-05-04 10:56:19 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2018-05-09 20:47:27 +0000 |
commit | 128485ccdb4f1c6f1bf1ebea85c5bed749cacd7a (patch) | |
tree | 350c795726910498f2a2ee7f9caa71018ae7ad5a /src/qml/jsruntime/qv4runtimeapi_p.h | |
parent | 20a5d1ab3f47b4da6ba39143beaafedb26dbad6a (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/jsruntime/qv4runtimeapi_p.h')
-rw-r--r-- | src/qml/jsruntime/qv4runtimeapi_p.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/qml/jsruntime/qv4runtimeapi_p.h b/src/qml/jsruntime/qv4runtimeapi_p.h index ac456283cb..4d4112bf0c 100644 --- a/src/qml/jsruntime/qv4runtimeapi_p.h +++ b/src/qml/jsruntime/qv4runtimeapi_p.h @@ -141,9 +141,8 @@ struct ExceptionCheck<void (*)(QV4::NoThrowEngine *, A, B, C)> { F(ReturnedValue, arrayLiteral, (ExecutionEngine *engine, Value *values, uint length)) \ F(ReturnedValue, objectLiteral, (ExecutionEngine *engine, const Value *args, int classId, int arrayValueCount, int arrayGetterSetterCountAndFlags)) \ \ - /* foreach */ \ - F(ReturnedValue, foreachIterator, (ExecutionEngine *engine, const Value &in)) \ - F(ReturnedValue, foreachNextPropertyName, (const Value &foreach_iterator)) \ + /* for-in and for-of */ \ + F(ReturnedValue, getIterator, (ExecutionEngine *engine, const Value &in, int iterator)) \ \ /* unary operators */ \ F(ReturnedValue, uMinus, (const Value &value)) \ |