aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jit/qv4assemblercommon.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/jit/qv4assemblercommon.cpp')
-rw-r--r--src/qml/jit/qv4assemblercommon.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/qml/jit/qv4assemblercommon.cpp b/src/qml/jit/qv4assemblercommon.cpp
index b302ac6403..831496a628 100644
--- a/src/qml/jit/qv4assemblercommon.cpp
+++ b/src/qml/jit/qv4assemblercommon.cpp
@@ -212,13 +212,6 @@ PlatformAssemblerCommon::Address PlatformAssemblerCommon::argStackAddress(int ar
return Address(StackPointerRegister, offset * PointerSize);
}
-JSC::MacroAssemblerBase::Address PlatformAssemblerCommon::inArgStackAddress(int arg)
-{
- int offset = arg - ArgInRegCount;
- Q_ASSERT(offset >= 0);
- return Address(FramePointerRegister, -(offset + 1) * PointerSize);
-}
-
void PlatformAssemblerCommon::passAccumulatorAsArg(int arg)
{
#ifndef QT_NO_DEBUG
@@ -354,10 +347,13 @@ void PlatformAssemblerCommon::tailCallRuntime(const char *functionName, const vo
void PlatformAssemblerCommon::setTailCallArg(RegisterID src, int arg)
{
- if (arg < ArgInRegCount)
+ if (arg < ArgInRegCount) {
move(src, registerForArg(arg));
- else
- storePtr(src, inArgStackAddress(arg));
+ } else {
+ // We never write to the incoming arguments space on the stack, and the tail call runtime
+ // method has the same signature as the jitted function, so it is safe for us to just reuse
+ // the arguments that we got in.
+ }
}
JSC::MacroAssemblerBase::Address PlatformAssemblerCommon::jsAlloca(int slotCount)