From f474eede801ed7bec712069e95bbe2f4ab5558ae Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Fri, 15 Nov 2013 00:06:18 +0100 Subject: Add support for accelerated property access to QML types and namespace support * Resolve lookups in namespaces at compile time and instruct the SSA optimizer to eliminate reads from the namespace (QQmlTypeWrapper) if possible. For example access to attached properties of types (i.e. MyNameSpace.ListView.isCurrentItem) requires neither reading the namespace nor the type. * Add support for accelerated lookup of attached properties Change-Id: Ib0b66404ed7e70e1d4a46a1ac8218743a4cc8608 Reviewed-by: Lars Knoll --- src/qml/jsruntime/qv4vme_moth.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/qml/jsruntime/qv4vme_moth.cpp') diff --git a/src/qml/jsruntime/qv4vme_moth.cpp b/src/qml/jsruntime/qv4vme_moth.cpp index 00672fea0f..9d6540ebe9 100644 --- a/src/qml/jsruntime/qv4vme_moth.cpp +++ b/src/qml/jsruntime/qv4vme_moth.cpp @@ -320,6 +320,10 @@ QV4::ReturnedValue VME::run(QV4::ExecutionContext *context, const uchar *code, STOREVALUE(instr.result, __qmljs_get_qobject_property(context, VALUEPTR(instr.base), instr.propertyIndex, instr.captureRequired)); MOTH_END_INSTR(LoadQObjectProperty) + MOTH_BEGIN_INSTR(LoadAttachedQObjectProperty) + STOREVALUE(instr.result, __qmljs_get_attached_property(context, instr.attachedPropertiesId, instr.propertyIndex)); + MOTH_END_INSTR(LoadAttachedQObjectProperty) + MOTH_BEGIN_INSTR(Push) TRACE(inline, "stack size: %u", instr.value); stackSize = instr.value; -- cgit v1.2.3