From 95a4d2cffe359b1eed98aa9f16cb1a183dfe9272 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Sun, 14 Apr 2013 22:37:54 +0200 Subject: Get rid of qmljs_get_this_object This is trivial to inline. Change-Id: Idccfc3c39d19e85768ec1be4b3b62b67abf00325 Reviewed-by: Simon Hausmann --- src/v4/llvm_runtime.cpp | 2 +- src/v4/moth/qv4vme_moth.cpp | 2 +- src/v4/qv4isel_masm.cpp | 3 ++- src/v4/qv4runtime.h | 3 --- 4 files changed, 4 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/v4/llvm_runtime.cpp b/src/v4/llvm_runtime.cpp index cd0789c2b3..d7d4edce6b 100644 --- a/src/v4/llvm_runtime.cpp +++ b/src/v4/llvm_runtime.cpp @@ -492,7 +492,7 @@ void __qmljs_llvm_foreach_next_property_name(Value *result, Value *it) void __qmljs_llvm_get_this_object(ExecutionContext *ctx, Value *result) { - __qmljs_get_thisObject(ctx, result); + *result = ctx->thisObject; } void __qmljs_llvm_delete_subscript(ExecutionContext *ctx, Value *result, Value *base, Value *index) diff --git a/src/v4/moth/qv4vme_moth.cpp b/src/v4/moth/qv4vme_moth.cpp index 26bd76a1d5..7dcf1aabc7 100644 --- a/src/v4/moth/qv4vme_moth.cpp +++ b/src/v4/moth/qv4vme_moth.cpp @@ -479,7 +479,7 @@ VM::Value VME::run(QQmlJS::VM::ExecutionContext *context, const uchar *&code, MOTH_END_INSTR(Ret) MOTH_BEGIN_INSTR(LoadThis) - __qmljs_get_thisObject(context, VALUEPTR(instr.result)); + VALUE(instr.result) = context->thisObject; MOTH_END_INSTR(LoadThis) MOTH_BEGIN_INSTR(InplaceElementOp) diff --git a/src/v4/qv4isel_masm.cpp b/src/v4/qv4isel_masm.cpp index 80803e811c..9a05ccbeee 100644 --- a/src/v4/qv4isel_masm.cpp +++ b/src/v4/qv4isel_masm.cpp @@ -824,7 +824,8 @@ void InstructionSelection::callValue(V4IR::Temp *value, V4IR::ExprList *args, V4 void InstructionSelection::loadThisObject(V4IR::Temp *temp) { - generateFunctionCall(Assembler::Void, __qmljs_get_thisObject, Assembler::ContextRegister, Assembler::PointerToValue(temp)); + _as->loadPtr(Pointer(Assembler::ContextRegister, offsetof(ExecutionContext, thisObject)), Assembler::ReturnValueRegister); + _as->storeArgument(Assembler::ReturnValueRegister, temp); } void InstructionSelection::loadConst(V4IR::Const *sourceConst, V4IR::Temp *targetTemp) diff --git a/src/v4/qv4runtime.h b/src/v4/qv4runtime.h index 3207ab4b1b..d5eebfa555 100644 --- a/src/v4/qv4runtime.h +++ b/src/v4/qv4runtime.h @@ -179,9 +179,6 @@ void __qmljs_set_element(ExecutionContext *ctx, const Value &object, const Value void __qmljs_foreach_iterator_object(ExecutionContext *ctx, Value *result, const Value &in); void __qmljs_foreach_next_property_name(Value *result, const Value &foreach_iterator); -// context -void __qmljs_get_thisObject(ExecutionContext *ctx, Value *result); - // type conversion and testing Value __qmljs_to_primitive(const Value &value, int typeHint); Bool __qmljs_to_boolean(const Value &value); -- cgit v1.2.3