diff options
Diffstat (limited to 'src/qml/jsruntime/qv4vme_moth.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4vme_moth.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4vme_moth.cpp b/src/qml/jsruntime/qv4vme_moth.cpp index 9077529277..db353c1834 100644 --- a/src/qml/jsruntime/qv4vme_moth.cpp +++ b/src/qml/jsruntime/qv4vme_moth.cpp @@ -700,6 +700,18 @@ QV4::ReturnedValue VME::interpret(JSTypesStackFrame *frame, ExecutionEngine *eng CHECK_EXCEPTION; MOTH_END_INSTR(LoadProperty) + MOTH_BEGIN_INSTR(LoadOptionalProperty) + STORE_IP(); + STORE_ACC(); + if (accumulator.isNullOrUndefined()) { + acc = Encode::undefined(); + code += offset; + } else { + acc = Runtime::LoadProperty::call(engine, accumulator, name); + } + CHECK_EXCEPTION; + MOTH_END_INSTR(LoadOptionalProperty) + MOTH_BEGIN_INSTR(GetLookup) STORE_IP(); STORE_ACC(); @@ -718,6 +730,21 @@ QV4::ReturnedValue VME::interpret(JSTypesStackFrame *frame, ExecutionEngine *eng CHECK_EXCEPTION; MOTH_END_INSTR(GetLookup) + MOTH_BEGIN_INSTR(GetOptionalLookup) + STORE_IP(); + STORE_ACC(); + + QV4::Lookup *l = function->executableCompilationUnit()->runtimeLookups + index; + + if (accumulator.isNullOrUndefined()) { + acc = Encode::undefined(); + code += offset; + } else { + acc = l->getter(l, engine, accumulator); + } + CHECK_EXCEPTION; + MOTH_END_INSTR(GetOptionalLookup) + MOTH_BEGIN_INSTR(StoreProperty) STORE_IP(); STORE_ACC(); |