From 40fd9ff0ffcf72fb1f27d011dfe07fea764fcff2 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Fri, 6 Dec 2013 10:28:50 +0100 Subject: Move Managed::type and some flags into the vtable Move the type flag into the vtable to free up these bits in the Managed class, and not have to set them at object construction time. As we often need to know whether a Managed object is a Object, FunctionObject or String, add some bitflags to test for these to the vtable. Change-Id: I7d08ca044544debb307b55f124f34cb086ad9e84 Reviewed-by: Simon Hausmann --- src/qml/jsruntime/qv4objectiterator_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/qml/jsruntime/qv4objectiterator_p.h') diff --git a/src/qml/jsruntime/qv4objectiterator_p.h b/src/qml/jsruntime/qv4objectiterator_p.h index 6c333b328c..33228cefaa 100644 --- a/src/qml/jsruntime/qv4objectiterator_p.h +++ b/src/qml/jsruntime/qv4objectiterator_p.h @@ -86,11 +86,11 @@ struct Q_QML_EXPORT ObjectIterator struct ForEachIteratorObject: Object { Q_MANAGED + Q_MANAGED_TYPE(ForeachIteratorObject) ObjectIterator it; ForEachIteratorObject(ExecutionContext *ctx, const ObjectRef o) : Object(ctx->engine), it(workArea, workArea + 1, o, ObjectIterator::EnumerableOnly|ObjectIterator::WithProtoChain) { setVTable(&static_vtbl); - type = Type_ForeachIteratorObject; } ReturnedValue nextPropertyName() { return it.nextPropertyNameAsString(); } -- cgit v1.2.3