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/qv4jsonobject.cpp | |
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/qv4jsonobject.cpp')
-rw-r--r-- | src/v4/qv4jsonobject.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/v4/qv4jsonobject.cpp b/src/v4/qv4jsonobject.cpp index d3a71acff9..22cd8ea8d5 100644 --- a/src/v4/qv4jsonobject.cpp +++ b/src/v4/qv4jsonobject.cpp @@ -281,8 +281,7 @@ bool Parser::parseMember(Object *o) if (!parseValue(&val)) return false; - PropertyDescriptor *p = o->insertMember(context->engine->newIdentifier(key), Attr_Data); - p->attrs = Attr_Data; + Property *p = o->insertMember(context->engine->newIdentifier(key), Attr_Data); p->value = val; END; @@ -782,10 +781,11 @@ QString Stringify::JO(Object *o) while (1) { String *name; uint index; - PropertyDescriptor *pd = it.next(&name, &index); + PropertyAttributes attrs; + Property *pd = it.next(&name, &index, &attrs); if (!pd) break; - Value v = o->getValueChecked(ctx, pd); + Value v = o->getValueChecked(ctx, pd, attrs); QString key; if (name) key = name->toQString(); |