diff options
author | Lars Knoll <lars.knoll@digia.com> | 2012-11-19 00:00:50 +0100 |
---|---|---|
committer | Erik Verbruggen <erik.verbruggen@digia.com> | 2012-11-20 09:40:14 +0100 |
commit | 79753b8fe5f3df79a9a4208056ac05281b5f97d0 (patch) | |
tree | 04c083834b8a8346d2ac51881dee981f538bb317 /qv4isel_masm.cpp | |
parent | 95e8de83dccc12b58e065ac7f0c54de25f580bf2 (diff) |
return results directly instead of using the context
The result variable in the context is not really
required, as we can return results directly in the
return value register.
Change-Id: I12554c228500aa24625ef82e31fd7f72989a71bb
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Diffstat (limited to 'qv4isel_masm.cpp')
-rw-r--r-- | qv4isel_masm.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/qv4isel_masm.cpp b/qv4isel_masm.cpp index 6290dd5990..6f95671c54 100644 --- a/qv4isel_masm.cpp +++ b/qv4isel_masm.cpp @@ -165,7 +165,7 @@ void InstructionSelection::operator()(IR::Function *function) _function->codeRef = linkBuffer.finalizeCodeWithoutDisassembly(); } - _function->code = (void (*)(VM::ExecutionContext *, const uchar *)) _function->codeRef.code().executableAddress(); + _function->code = (Value (*)(VM::ExecutionContext *, const uchar *)) _function->codeRef.code().executableAddress(); qSwap(_function, function); } @@ -722,7 +722,7 @@ void InstructionSelection::visitCJump(IR::CJump *s) void InstructionSelection::visitRet(IR::Ret *s) { if (IR::Temp *t = s->expr->asTemp()) { - copyValue(Pointer(ContextRegister, offsetof(ExecutionContext, result)), t); + copyValue(ReturnValueRegister, t); return; } Q_UNIMPLEMENTED(); |