From af7ca3607cc6e530af8ed0d1fa5e6d132bc16ac1 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Thu, 6 Mar 2014 12:06:36 +0100 Subject: Use an array of Value's for Object::memberData This cuts the memory required to store properties in an object in half for the common case. Accessor properties require two slots inside memberData, but data properties only one. Change-Id: I0bab1b88ca9ed5930abf065c77c89985b9ed5320 Reviewed-by: Simon Hausmann --- src/qml/jsruntime/qv4regexpobject.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/qml/jsruntime/qv4regexpobject.cpp') diff --git a/src/qml/jsruntime/qv4regexpobject.cpp b/src/qml/jsruntime/qv4regexpobject.cpp index 74c8a2d35e..790eaf79f7 100644 --- a/src/qml/jsruntime/qv4regexpobject.cpp +++ b/src/qml/jsruntime/qv4regexpobject.cpp @@ -186,7 +186,7 @@ Property *RegExpObject::lastIndexProperty(ExecutionContext *ctx) { Q_UNUSED(ctx); Q_ASSERT(0 == internalClass->find(ctx->engine->newIdentifier(QStringLiteral("lastIndex")))); - return &memberData[0]; + return propertyAt(0); } // Converts a JS RegExp to a QRegExp. @@ -394,8 +394,8 @@ ReturnedValue RegExpPrototype::method_exec(CallContext *ctx) array->arrayPut(i, v); } array->setArrayLengthUnchecked(len); - array->memberData[Index_ArrayIndex].value = Primitive::fromInt32(result); - array->memberData[Index_ArrayInput].value = arg.asReturnedValue(); + array->memberData[Index_ArrayIndex] = Primitive::fromInt32(result); + array->memberData[Index_ArrayInput] = arg.asReturnedValue(); regExpCtor->lastMatch = array; regExpCtor->lastInput = arg->stringValue(); -- cgit v1.2.3