diff options
author | Lars Knoll <[email protected]> | 2014-03-06 12:06:36 +0100 |
---|---|---|
committer | The Qt Project <[email protected]> | 2014-03-07 21:16:01 +0100 |
commit | af7ca3607cc6e530af8ed0d1fa5e6d132bc16ac1 (patch) | |
tree | 7be76616922e984d8ea59e40d5e1f797a4adc3e7 /src/qml/jsruntime/qv4regexpobject.cpp | |
parent | 19cd5c46693a287c08025c01ded8eaf140e21317 (diff) |
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 <[email protected]>
Diffstat (limited to 'src/qml/jsruntime/qv4regexpobject.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4regexpobject.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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(); |