From f62bf4e76d9ae9bf685e37ace3dc6d2365e2f82f Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Wed, 12 Nov 2014 20:07:27 +0100 Subject: Changed InternalClass to store Identifier* instead of String* All members are identifiers anyway, so this gets rid of a ### and also simplifies some of the call sites by removing the need for a scoped string. Change-Id: Ic6b550cdb97afa5a4b0fa7e9b13e7768ed3f6bd8 Reviewed-by: Lars Knoll --- src/qml/jsruntime/qv4object.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/qml/jsruntime/qv4object.cpp') diff --git a/src/qml/jsruntime/qv4object.cpp b/src/qml/jsruntime/qv4object.cpp index d95c8cf444..2b89a37771 100644 --- a/src/qml/jsruntime/qv4object.cpp +++ b/src/qml/jsruntime/qv4object.cpp @@ -42,6 +42,7 @@ #include "qv4scopedvalue_p.h" #include "qv4memberdata_p.h" #include "qv4objectiterator_p.h" +#include "qv4identifier_p.h" #include @@ -553,7 +554,7 @@ void Object::advanceIterator(Managed *m, ObjectIterator *it, String *&name, uint } while (it->memberIndex < o->internalClass()->size) { - String *n = o->internalClass()->nameMap.at(it->memberIndex); + Identifier *n = o->internalClass()->nameMap.at(it->memberIndex); if (!n) { // accessor properties have a dummy entry with n == 0 ++it->memberIndex; @@ -564,7 +565,8 @@ void Object::advanceIterator(Managed *m, ObjectIterator *it, String *&name, uint PropertyAttributes a = o->internalClass()->propertyData[it->memberIndex]; ++it->memberIndex; if (!(it->flags & ObjectIterator::EnumerableOnly) || a.isEnumerable()) { - name = n; + // #### GC + name = reinterpret_cast(m->engine()->newString(n->string)); *attrs = a; pd->copy(*p, a); return; -- cgit v1.2.3