aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-04-14 22:37:54 +0200
committerSimon Hausmann <simon.hausmann@digia.com>2013-04-15 10:47:40 +0200
commit95a4d2cffe359b1eed98aa9f16cb1a183dfe9272 (patch)
tree73bbfdf56b5c1eced8c49eca0738fbf67d2fa5c5 /src
parent58c5fde3f67e2e3d790c2d07ab9b8c5edab61bbc (diff)
Get rid of qmljs_get_this_object
This is trivial to inline. Change-Id: Idccfc3c39d19e85768ec1be4b3b62b67abf00325 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/v4/llvm_runtime.cpp2
-rw-r--r--src/v4/moth/qv4vme_moth.cpp2
-rw-r--r--src/v4/qv4isel_masm.cpp3
-rw-r--r--src/v4/qv4runtime.h3
4 files changed, 4 insertions, 6 deletions
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);