Port __qmljs_get_thisobject to new calling convention
authorSimon Hausmann <simon.hausmann@digia.com>
Sun, 17 Feb 2013 21:21:51 +0000 (22:21 +0100)
committerErik Verbruggen <erik.verbruggen@digia.com>
Wed, 20 Feb 2013 08:58:59 +0000 (09:58 +0100)
Change-Id: I59a921d6838fd4e8419bf6cf62d5dca39e1142cd
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
src/v4/llvm_runtime.cpp
src/v4/moth/qv4vme_moth.cpp
src/v4/qmljs_runtime.cpp
src/v4/qmljs_runtime.h
src/v4/qv4isel_masm.cpp

index bfd9ba0..0322ecc 100644 (file)
@@ -502,7 +502,7 @@ void __qmljs_llvm_foreach_next_property_name(Value *result, Value *it)
 
 void __qmljs_llvm_get_this_object(ExecutionContext *ctx, Value *result)
 {
-    *result = __qmljs_get_thisObject(ctx);
+    __qmljs_get_thisObject(ctx, result);
 }
 
 void __qmljs_llvm_delete_subscript(ExecutionContext *ctx, Value *result, Value *base, Value *index)
index ba9f1e5..5447e15 100644 (file)
@@ -432,7 +432,7 @@ VM::Value VME::operator()(QQmlJS::VM::ExecutionContext *context, const uchar *co
     MOTH_END_INSTR(Ret)
 
     MOTH_BEGIN_INSTR(LoadThis)
-        VALUE(instr.result) = __qmljs_get_thisObject(context);
+        __qmljs_get_thisObject(context, VALUEPTR(instr.result));
     MOTH_END_INSTR(LoadThis)
 
     MOTH_BEGIN_INSTR(InplaceElementOp)
index 1994e37..b237af2 100644 (file)
@@ -726,9 +726,9 @@ void __qmljs_set_property_lookup(ExecutionContext *ctx, const Value &object, int
 }
 
 
-Value __qmljs_get_thisObject(ExecutionContext *ctx)
+void __qmljs_get_thisObject(ExecutionContext *ctx, Value *result)
 {
-    return ctx->thisObject;
+    *result = ctx->thisObject;
 }
 
 uint __qmljs_equal(const Value &x, const Value &y, ExecutionContext *ctx)
index 9a16a44..54e3dbf 100644 (file)
@@ -163,7 +163,7 @@ void __qmljs_foreach_iterator_object(ExecutionContext *ctx, Value *result, const
 void __qmljs_foreach_next_property_name(Value *result, const Value &foreach_iterator);
 
 // context
-Value __qmljs_get_thisObject(ExecutionContext *ctx);
+void __qmljs_get_thisObject(ExecutionContext *ctx, Value *result);
 
 // type conversion and testing
 Value __qmljs_to_primitive(const Value &value, ExecutionContext *ctx, int typeHint);
index 0d8d2ae..2160b40 100644 (file)
@@ -677,7 +677,7 @@ void InstructionSelection::callValue(IR::Temp *value, IR::ExprList *args, IR::Te
 
 void InstructionSelection::loadThisObject(IR::Temp *temp)
 {
-    generateFunctionCall(temp, __qmljs_get_thisObject, Assembler::ContextRegister);
+    generateFunctionCall(Assembler::Void, __qmljs_get_thisObject, Assembler::ContextRegister, Assembler::PointerToValue(temp));
 }
 
 void InstructionSelection::loadConst(IR::Const *sourceConst, IR::Temp *targetTemp)