diff options
author | Lars Knoll <lars.knoll@digia.com> | 2014-04-10 17:17:14 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2014-07-22 13:48:56 +0200 |
commit | 441a6ff47a713587f1b43c61377ed64caf15692f (patch) | |
tree | f0a8e751dd25a9a2dcb0389f5d3917016959d6c0 /src/qml/jsruntime/qv4objectiterator_p.h | |
parent | 3f39bc03f1fc3ba26eab7b1b0828d3cfa93abb2b (diff) |
Convert ObjectIterator to new data layout
Change-Id: Icda43ec9c1e324afebcf632a5fdcc40d855b193d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4objectiterator_p.h')
-rw-r--r-- | src/qml/jsruntime/qv4objectiterator_p.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/qml/jsruntime/qv4objectiterator_p.h b/src/qml/jsruntime/qv4objectiterator_p.h index c87f284288..b914990ccd 100644 --- a/src/qml/jsruntime/qv4objectiterator_p.h +++ b/src/qml/jsruntime/qv4objectiterator_p.h @@ -85,14 +85,22 @@ struct Q_QML_EXPORT ObjectIterator struct ForEachIteratorObject: Object { V4_OBJECT Q_MANAGED_TYPE(ForeachIteratorObject) - ObjectIterator it; + struct Data { + Data(Value *scratch1, Value *scratch2, const ObjectRef o, uint flags) + : it(scratch1, scratch2, o, flags) {} + Data(Scope &scope, const ObjectRef o, uint flags) + : it (scope, o, flags) {} + ObjectIterator it; + }; + Data data; + ForEachIteratorObject(ExecutionContext *ctx, const ObjectRef o) - : Object(ctx->engine), it(workArea, workArea + 1, - o, ObjectIterator::EnumerableOnly|ObjectIterator::WithProtoChain) { + : Object(ctx->engine), data(workArea, workArea + 1, + o, ObjectIterator::EnumerableOnly|ObjectIterator::WithProtoChain) { setVTable(staticVTable()); } - ReturnedValue nextPropertyName() { return it.nextPropertyNameAsString(); } + ReturnedValue nextPropertyName() { return data.it.nextPropertyNameAsString(); } protected: static void markObjects(Managed *that, ExecutionEngine *e); |