aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4object_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2017-05-15 09:56:05 +0200
committerLars Knoll <lars.knoll@qt.io>2017-05-19 06:23:29 +0000
commitafbb57ae84ecbee5fab9eb6e58356b19d7995ea5 (patch)
tree33418ab6f9507c238998c61fdd818cb8823db71a /src/qml/jsruntime/qv4object_p.h
parentcae7975a036352ca4bbcf1381a445362f8e01367 (diff)
Move the prototype into the internal class
This saves another pointer on all Objects. Currently introduces a slight performance regression on some of the v8 benchmarks, that needs addressing. Change-Id: I87de8e1d198d2683f4e903c467ce2a60ba542243 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4object_p.h')
-rw-r--r--src/qml/jsruntime/qv4object_p.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4object_p.h b/src/qml/jsruntime/qv4object_p.h
index 951659a4bc..cf04a84175 100644
--- a/src/qml/jsruntime/qv4object_p.h
+++ b/src/qml/jsruntime/qv4object_p.h
@@ -95,7 +95,7 @@ struct Object : Base {
return memberData->data + index;
}
- Pointer<Object> prototype;
+ Heap::Object *prototype() const { return internalClass->prototype; }
Pointer<MemberData> memberData;
Pointer<ArrayData> arrayData;
};
@@ -215,7 +215,7 @@ struct Q_QML_EXPORT Object: Managed {
void setProperty(uint index, const Property *p);
const ObjectVTable *vtable() const { return reinterpret_cast<const ObjectVTable *>(d()->vtable()); }
- Heap::Object *prototype() const { return d()->prototype; }
+ Heap::Object *prototype() const { return d()->prototype(); }
bool setPrototype(Object *proto);
void getOwnProperty(String *name, PropertyAttributes *attrs, Property *p = 0);