aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-11-09 01:00:06 +0100
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-11-09 01:00:07 +0100
commitb01a16ea74e92c78c009f132ef7bc70e91398a98 (patch)
treefca15f247fed71ebfd67e7fda7864612190c42d9 /src/qml/jsruntime
parent6fecfdc769314162d6c909c9ae0a85631964883f (diff)
parent6c08137faf1a53db879701126608833474a2450b (diff)
Merge remote-tracking branch 'origin/5.12' into dev
Diffstat (limited to 'src/qml/jsruntime')
-rw-r--r--src/qml/jsruntime/qv4runtime.cpp6
-rw-r--r--src/qml/jsruntime/qv4runtime_p.h2
-rw-r--r--src/qml/jsruntime/qv4vme_moth.cpp4
3 files changed, 12 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4runtime.cpp b/src/qml/jsruntime/qv4runtime.cpp
index b576bb4d87..13244fdd95 100644
--- a/src/qml/jsruntime/qv4runtime.cpp
+++ b/src/qml/jsruntime/qv4runtime.cpp
@@ -595,6 +595,12 @@ QV4::ReturnedValue RuntimeHelpers::addHelper(ExecutionEngine *engine, const Valu
return Encode(x + y);
}
+ReturnedValue RuntimeHelpers::getTemplateObject(Function *function, int index)
+{
+ return function->compilationUnit->templateObjectAt(index)->asReturnedValue();
+}
+
+
void Runtime::method_storeProperty(ExecutionEngine *engine, const Value &object, int nameIndex, const Value &value)
{
Scope scope(engine);
diff --git a/src/qml/jsruntime/qv4runtime_p.h b/src/qml/jsruntime/qv4runtime_p.h
index 72af90d1dc..2be3ebf012 100644
--- a/src/qml/jsruntime/qv4runtime_p.h
+++ b/src/qml/jsruntime/qv4runtime_p.h
@@ -114,6 +114,8 @@ struct Q_QML_PRIVATE_EXPORT RuntimeHelpers {
static Bool strictEqual(const Value &x, const Value &y);
static ReturnedValue addHelper(ExecutionEngine *engine, const Value &left, const Value &right);
+
+ static ReturnedValue getTemplateObject(Function *function, int index);
};
diff --git a/src/qml/jsruntime/qv4vme_moth.cpp b/src/qml/jsruntime/qv4vme_moth.cpp
index 1cca50f6c1..5208894934 100644
--- a/src/qml/jsruntime/qv4vme_moth.cpp
+++ b/src/qml/jsruntime/qv4vme_moth.cpp
@@ -1378,6 +1378,10 @@ QV4::ReturnedValue VME::interpret(CppStackFrame *frame, ExecutionEngine *engine,
}
MOTH_END_INSTR(ThrowOnNullOrUndefined)
+ MOTH_BEGIN_INSTR(GetTemplateObject)
+ acc = RuntimeHelpers::getTemplateObject(function, index);
+ MOTH_END_INSTR(GetTemplateObject)
+
MOTH_BEGIN_INSTR(Debug)
#if QT_CONFIG(qml_debug)
STORE_IP();