diff options
author | Lars Knoll <lars.knoll@theqtcompany.com> | 2014-11-01 21:44:57 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2014-11-07 02:00:05 +0100 |
commit | b340caa0d3ebf7f76c0445b2cdd4032d8e3bf8d5 (patch) | |
tree | e475eae0dc4a6c68ca3ee41132b573fc76d2dc10 /src/qml/jsruntime/qv4functionobject_p.h | |
parent | e22fc141c3fc5362f9b906c43a1b7c0dbc1f85a3 (diff) |
Get rid of Members and directly store MemberData::Data pointers
And do the same change for ArrayData.
Change-Id: Ia1ae56bd0ff586c9b987e15af7a53f395a37054a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4functionobject_p.h')
-rw-r--r-- | src/qml/jsruntime/qv4functionobject_p.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/qml/jsruntime/qv4functionobject_p.h b/src/qml/jsruntime/qv4functionobject_p.h index 1ff8124e6a..07a8c45aed 100644 --- a/src/qml/jsruntime/qv4functionobject_p.h +++ b/src/qml/jsruntime/qv4functionobject_p.h @@ -96,7 +96,7 @@ struct Q_QML_EXPORT FunctionObject: Object { static Returned<FunctionObject> *createScriptFunction(ExecutionContext *scope, Function *function, bool createProto = true); - ReturnedValue protoProperty() { return memberData()[Index_Prototype].asReturnedValue(); } + ReturnedValue protoProperty() { return memberData()->data()[Index_Prototype].asReturnedValue(); } bool needsActivation() const { return d()->needsActivation; } bool strictMode() const { return d()->strictMode; } @@ -202,21 +202,22 @@ struct ScriptFunction: SimpleScriptFunction { struct BoundFunction: FunctionObject { struct Data : FunctionObject::Data { - Data(ExecutionContext *scope, FunctionObject *target, const ValueRef boundThis, const Members &boundArgs); + Data(ExecutionContext *scope, FunctionObject *target, const ValueRef boundThis, MemberData *boundArgs); FunctionObject *target; Value boundThis; - Members boundArgs; + MemberData::Data *boundArgs; }; V4_OBJECT(FunctionObject) - static Returned<BoundFunction> *create(ExecutionContext *scope, FunctionObject *target, const ValueRef boundThis, const QV4::Members &boundArgs) + static Returned<BoundFunction> *create(ExecutionContext *scope, FunctionObject *target, const ValueRef boundThis, QV4::MemberData *boundArgs) { return scope->engine()->memoryManager->alloc<BoundFunction>(scope, target, boundThis, boundArgs); } FunctionObject *target() { return d()->target; } Value boundThis() const { return d()->boundThis; } - Members boundArgs() const { return d()->boundArgs; } + // ### GC + MemberData::Data *boundArgs() const { return d()->boundArgs; } static ReturnedValue construct(Managed *, CallData *d); static ReturnedValue call(Managed *that, CallData *dd); |