aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4object.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@theqtcompany.com>2014-11-12 20:07:27 +0100
committerSimon Hausmann <simon.hausmann@digia.com>2014-11-21 16:36:10 +0100
commitf62bf4e76d9ae9bf685e37ace3dc6d2365e2f82f (patch)
treee3fe77546b69c0a1b82dec7306896a4b31876954 /src/qml/jsruntime/qv4object.cpp
parentf58b5229a31e9fec49b4eb055c56f9a78e423866 (diff)
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 <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4object.cpp')
-rw-r--r--src/qml/jsruntime/qv4object.cpp6
1 files changed, 4 insertions, 2 deletions
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 <stdint.h>
@@ -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<QV4::String*>(m->engine()->newString(n->string));
*attrs = a;
pd->copy(*p, a);
return;