diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-04-10 10:46:23 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2013-04-12 15:19:02 +0200 |
commit | d0af8986b32aa4cccdc2ff7d8dc5e66e9d53ed77 (patch) | |
tree | 1385c3f8bad78b71d0f2c83518976bc86bc7f3cb /src/v4/qv4internalclass.h | |
parent | 9bd0895c277150aa51ee0ce55ce492c41346b18e (diff) |
Move property attributes out of the property arrays
Rather large change that fully separates the property
attributes from the property data. This saves quite some
memory. Since the property data for members is saves
in the class structure it'll also allow optimizations
to the lookup code.
Change-Id: I9ba1d372bb756695bef8188d1b86275562a1b219
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/v4/qv4internalclass.h')
-rw-r--r-- | src/v4/qv4internalclass.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/v4/qv4internalclass.h b/src/v4/qv4internalclass.h index 92bf19a741..cc3b03190b 100644 --- a/src/v4/qv4internalclass.h +++ b/src/v4/qv4internalclass.h @@ -62,14 +62,22 @@ struct InternalClass { QVector<PropertyAttributes> propertyData; QHash<int, InternalClass *> transitions; // id to next class, positive means add, negative delete + + InternalClass *m_sealed; + InternalClass *m_frozen; + uint size; - InternalClass(ExecutionEngine *engine) : engine(engine), size(0) {} + InternalClass(ExecutionEngine *engine) : engine(engine), m_sealed(0), m_frozen(0), size(0) {} InternalClass *addMember(String *string, PropertyAttributes data, uint *index = 0); + InternalClass *changeMember(String *string, PropertyAttributes data, uint *index = 0); void removeMember(Object *object, uint id); uint find(String *s); + InternalClass *sealed(); + InternalClass *frozen(); + private: InternalClass(const InternalClass &other); }; |