aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jit/qv4isel_masm.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/jit/qv4isel_masm.cpp')
-rw-r--r--src/qml/jit/qv4isel_masm.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/qml/jit/qv4isel_masm.cpp b/src/qml/jit/qv4isel_masm.cpp
index 9696f59e7c..dad18c8cf2 100644
--- a/src/qml/jit/qv4isel_masm.cpp
+++ b/src/qml/jit/qv4isel_masm.cpp
@@ -399,6 +399,23 @@ void InstructionSelection::callBuiltinInvalid(IR::Name *func, IR::ExprList *args
}
}
+void InstructionSelection::callBuiltinTypeofQmlContextProperty(IR::Expr *base,
+ IR::Member::MemberKind kind,
+ int propertyIndex, IR::Expr *result)
+{
+ if (kind == IR::Member::MemberOfQmlScopeObject) {
+ generateFunctionCall(result, Runtime::typeofScopeObjectProperty, Assembler::EngineRegister,
+ Assembler::PointerToValue(base),
+ Assembler::TrustedImm32(propertyIndex));
+ } else if (kind == IR::Member::MemberOfQmlContextObject) {
+ generateFunctionCall(result, Runtime::typeofContextObjectProperty,
+ Assembler::EngineRegister, Assembler::PointerToValue(base),
+ Assembler::TrustedImm32(propertyIndex));
+ } else {
+ Q_UNREACHABLE();
+ }
+}
+
void InstructionSelection::callBuiltinTypeofMember(IR::Expr *base, const QString &name,
IR::Expr *result)
{