summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2013-02-14 12:16:30 +0100
committerLars Knoll <lars.knoll@digia.com>2013-02-14 12:33:39 +0100
commit2008f2bd376556a328eb3778198d1cfbc5d09466 (patch)
tree8e3c1942fc499525ac8e67e3277030e523b2a491
parentb09bb08d7440cfcf4ab6440bac4990e0b4542c30 (diff)
Convert builtin typeof to the new calling convention
Change-Id: I40f268c53dacf2ee188b3d1df9391df3e5e812f8 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
-rw-r--r--src/v4/moth/qv4vme_moth.cpp2
-rw-r--r--src/v4/qmljs_runtime.cpp5
-rw-r--r--src/v4/qmljs_runtime.h2
-rw-r--r--src/v4/qv4isel_masm.cpp2
4 files changed, 6 insertions, 5 deletions
diff --git a/src/v4/moth/qv4vme_moth.cpp b/src/v4/moth/qv4vme_moth.cpp
index cd6264a0..e366ec33 100644
--- a/src/v4/moth/qv4vme_moth.cpp
+++ b/src/v4/moth/qv4vme_moth.cpp
@@ -312,7 +312,7 @@ VM::Value VME::operator()(QQmlJS::VM::ExecutionContext *context, const uchar *co
MOTH_END_INSTR(CallBuiltinDeleteName)
MOTH_BEGIN_INSTR(CallBuiltinTypeofMember)
- VALUE(instr.result) = __qmljs_builtin_typeof_member(VALUE(instr.base), instr.member, context);
+ __qmljs_builtin_typeof_member(context, VALUEPTR(instr.result), VALUE(instr.base), instr.member);
MOTH_END_INSTR(CallBuiltinTypeofMember)
MOTH_BEGIN_INSTR(CallBuiltinTypeofSubscript)
diff --git a/src/v4/qmljs_runtime.cpp b/src/v4/qmljs_runtime.cpp
index 520c1e3c..58ff36ab 100644
--- a/src/v4/qmljs_runtime.cpp
+++ b/src/v4/qmljs_runtime.cpp
@@ -1028,10 +1028,11 @@ Value __qmljs_builtin_typeof_name(String *name, ExecutionContext *context)
return __qmljs_builtin_typeof(context->getPropertyNoThrow(name), context);
}
-Value __qmljs_builtin_typeof_member(Value base, String *name, ExecutionContext *context)
+void __qmljs_builtin_typeof_member(ExecutionContext *context, Value *result, const Value &base, String *name)
{
Value obj = base.toObject(context);
- return __qmljs_builtin_typeof(obj.objectValue()->__get__(context, name), context);
+ if (result)
+ *result = __qmljs_builtin_typeof(obj.objectValue()->__get__(context, name), context);
}
Value __qmljs_builtin_typeof_element(Value base, Value index, ExecutionContext *context)
diff --git a/src/v4/qmljs_runtime.h b/src/v4/qmljs_runtime.h
index 4c507012..0a08b71e 100644
--- a/src/v4/qmljs_runtime.h
+++ b/src/v4/qmljs_runtime.h
@@ -103,7 +103,7 @@ Value __qmljs_construct_value(ExecutionContext *context, Value func, Value *args
Value __qmljs_builtin_typeof(Value val, ExecutionContext *ctx);
Value __qmljs_builtin_typeof_name(String *name, ExecutionContext *context);
-Value __qmljs_builtin_typeof_member(Value base, String *name, ExecutionContext *context);
+void __qmljs_builtin_typeof_member(ExecutionContext* context, Value* result, const Value &base, String *name);
Value __qmljs_builtin_typeof_element(Value base, Value index, ExecutionContext *context);
void __qmljs_builtin_post_increment(ExecutionContext *ctx, Value *result, Value *val);
diff --git a/src/v4/qv4isel_masm.cpp b/src/v4/qv4isel_masm.cpp
index 467cc3e3..1c143849 100644
--- a/src/v4/qv4isel_masm.cpp
+++ b/src/v4/qv4isel_masm.cpp
@@ -480,7 +480,7 @@ void InstructionSelection::callBuiltinInvalid(IR::Name *func, IR::ExprList *args
void InstructionSelection::callBuiltinTypeofMember(IR::Temp *base, const QString &name, IR::Temp *result)
{
- generateFunctionCall(result, __qmljs_builtin_typeof_member, base, identifier(name), Assembler::ContextRegister);
+ generateFunctionCall(Assembler::Void, __qmljs_builtin_typeof_member, Assembler::ContextRegister, Assembler::PointerToValue(result), Assembler::PointerToValue(base), identifier(name));
}
void InstructionSelection::callBuiltinTypeofSubscript(IR::Temp *base, IR::Temp *index, IR::Temp *result)