diff options
author | Lars Knoll <lars.knoll@digia.com> | 2012-10-10 13:46:12 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@digia.com> | 2012-10-10 13:49:35 +0200 |
commit | 7a9ece649ef84b22308e17926d4a4e6013c75091 (patch) | |
tree | 6f388db543155f060f11dff9fa63130491f14a41 | |
parent | 85dc29103f45f7817ab996acb7db06d2ed74e223 (diff) |
Emit code for copying values
Remove __qmljs_copy in the process.
-rw-r--r-- | qmljs_runtime.cpp | 2 | ||||
-rw-r--r-- | qmljs_runtime.h | 5 | ||||
-rw-r--r-- | qv4isel_masm.cpp | 6 |
3 files changed, 6 insertions, 7 deletions
diff --git a/qmljs_runtime.cpp b/qmljs_runtime.cpp index 2ca6f8a579..230f13c22c 100644 --- a/qmljs_runtime.cpp +++ b/qmljs_runtime.cpp @@ -330,7 +330,7 @@ void Context::initCallContext(ExecutionEngine *e, const Value *object, FunctionO void Context::leaveCallContext(FunctionObject *f, Value *returnValue) { if (returnValue) - __qmljs_copy(returnValue, &result); + *returnValue = result; if (! f->needsActivation) { delete[] locals; diff --git a/qmljs_runtime.h b/qmljs_runtime.h index 38e7fcb3f2..a21269361d 100644 --- a/qmljs_runtime.h +++ b/qmljs_runtime.h @@ -639,11 +639,6 @@ inline void __qmljs_init_object(Value *result, Object *object) *result = Value::fromObject(object); } -inline void __qmljs_copy(Value *result, Value *source) -{ - *result = *source; -} - // type conversion and testing inline void __qmljs_to_primitive(Context *ctx, Value *result, const Value *value, int typeHint) { diff --git a/qv4isel_masm.cpp b/qv4isel_masm.cpp index 7ce009bd54..8129d62907 100644 --- a/qv4isel_masm.cpp +++ b/qv4isel_masm.cpp @@ -642,5 +642,9 @@ void InstructionSelection::callRuntimeMethodImp(const char* name, BuiltinMethod template <typename Result, typename Source> void InstructionSelection::copyValue(Result result, Source source) { - generateFunctionCall(__qmljs_copy, result, source); + // ### could avoid using Gpr0 in many cases + loadArgument(source, Gpr0); + loadDouble(Gpr0, FPGpr0); + loadArgument(result, Gpr0); + storeDouble(FPGpr0, Gpr0); } |