diff options
author | Lars Knoll <lars.knoll@digia.com> | 2014-03-06 10:13:26 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-07 21:15:58 +0100 |
commit | 19cd5c46693a287c08025c01ded8eaf140e21317 (patch) | |
tree | c24bb7cc6cb0a3bfcd957e1c654c45b1a67f73ab /src/qml/jsruntime/qv4internalclass_p.h | |
parent | 6a0d0c8f7eff456b7ad6ad7609275410cb8d8f1c (diff) |
Reserve a double slot for accessor properties
Reserve two slots in the internal class for accessor
properties. This opens up reducing the default storage
required per data property to one Value. In practice
this implies cutting the required memory in half.
Change-Id: Ifed897852bbdfd810018f0d6b049fca6690ead2c
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4internalclass_p.h')
-rw-r--r-- | src/qml/jsruntime/qv4internalclass_p.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4internalclass_p.h b/src/qml/jsruntime/qv4internalclass_p.h index b25b895183..91c6e264db 100644 --- a/src/qml/jsruntime/qv4internalclass_p.h +++ b/src/qml/jsruntime/qv4internalclass_p.h @@ -233,10 +233,13 @@ struct InternalClass { static InternalClass *create(ExecutionEngine *engine, const ManagedVTable *vtable, Object *proto); InternalClass *changePrototype(Object *proto); InternalClass *changeVTable(const ManagedVTable *vt); + static void addMember(Object *object, StringRef string, PropertyAttributes data, uint *index); + static void addMember(Object *object, String *string, PropertyAttributes data, uint *index); InternalClass *addMember(StringRef string, PropertyAttributes data, uint *index = 0); InternalClass *addMember(String *string, PropertyAttributes data, uint *index = 0); InternalClass *changeMember(String *string, PropertyAttributes data, uint *index = 0); - void removeMember(Object *object, Identifier *id); + static void changeMember(Object *object, String *string, PropertyAttributes data, uint *index = 0); + static void removeMember(Object *object, Identifier *id); uint find(const StringRef string); uint find(const String *s); @@ -247,6 +250,7 @@ struct InternalClass { void markObjects(); private: + InternalClass *addMemberImpl(String *string, PropertyAttributes data, uint *index); friend struct ExecutionEngine; InternalClass(ExecutionEngine *engine); InternalClass(const InternalClass &other); |