2008-12-12 Gavin Barraclough <barraclough@apple.com>
Reviewed by Camron Zwarich.
Replace emitPutCallArg methods with emitPutJITStubArg methods. Primarily to make the argument numbering
more sensible (1-based incrementing by 1, rather than 0-based incrementing by 4). The CTI name also seems
to be being deprecated from the code generally.
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
(JSC::JIT::privateCompileSlowCases):
(JSC::JIT::privateCompileCTIMachineTrampolines):
* jit/JIT.h:
* jit/JITArithmetic.cpp:
(JSC::JIT::compileBinaryArithOp):
(JSC::JIT::compileBinaryArithOpSlowCase):
* jit/JITCall.cpp:
(JSC::JIT::compileOpCallSetupArgs):
(JSC::JIT::compileOpCallEvalSetupArgs):
(JSC::JIT::compileOpConstructSetupArgs):
(JSC::JIT::compileOpCall):
* jit/JITInlineMethods.h:
(JSC::JIT::emitPutJITStubArg):
(JSC::JIT::emitPutJITStubArgConstant):
(JSC::JIT::emitGetJITStubArg):
(JSC::JIT::emitPutJITStubArgFromVirtualRegister):
* jit/JITPropertyAccess.cpp:
(JSC::JIT::compileGetByIdHotPath):
(JSC::JIT::compilePutByIdHotPath):
(JSC::JIT::compileGetByIdSlowCase):
(JSC::JIT::compilePutByIdSlowCase):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@39268 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/JavaScriptCore/jit/JITInlineMethods.h b/JavaScriptCore/jit/JITInlineMethods.h
index bc3e9ea..b3b859b 100644
--- a/JavaScriptCore/jit/JITInlineMethods.h
+++ b/JavaScriptCore/jit/JITInlineMethods.h
@@ -101,24 +101,24 @@
}
// puts an arg onto the stack, as an arg to a context threaded function.
-ALWAYS_INLINE void JIT::emitPutCTIArg(RegisterID src, unsigned offset)
+ALWAYS_INLINE void JIT::emitPutJITStubArg(RegisterID src, unsigned argumentNumber)
{
- poke(src, (offset / sizeof(void*)) + 1);
+ poke(src, argumentNumber);
}
-ALWAYS_INLINE void JIT::emitPutCTIArgConstant(unsigned value, unsigned offset)
+ALWAYS_INLINE void JIT::emitPutJITStubArgConstant(unsigned value, unsigned argumentNumber)
{
- poke(Imm32(value), (offset / sizeof(void*)) + 1);
+ poke(Imm32(value), argumentNumber);
}
-ALWAYS_INLINE void JIT::emitPutCTIArgConstant(void* value, unsigned offset)
+ALWAYS_INLINE void JIT::emitPutJITStubArgConstant(void* value, unsigned argumentNumber)
{
- poke(ImmPtr(value), (offset / sizeof(void*)) + 1);
+ poke(ImmPtr(value), argumentNumber);
}
-ALWAYS_INLINE void JIT::emitGetCTIArg(unsigned offset, RegisterID dst)
+ALWAYS_INLINE void JIT::emitGetJITStubArg(unsigned argumentNumber, RegisterID dst)
{
- peek(dst, (offset / sizeof(void*)) + 1);
+ peek(dst, argumentNumber);
}
ALWAYS_INLINE JSValue* JIT::getConstantImmediateNumericArg(unsigned src)
@@ -131,14 +131,14 @@
}
// get arg puts an arg from the SF register array onto the stack, as an arg to a context threaded function.
-ALWAYS_INLINE void JIT::emitPutCTIArgFromVirtualRegister(unsigned src, unsigned offset, RegisterID scratch)
+ALWAYS_INLINE void JIT::emitPutJITStubArgFromVirtualRegister(unsigned src, unsigned argumentNumber, RegisterID scratch)
{
if (m_codeBlock->isConstantRegisterIndex(src)) {
JSValue* value = m_codeBlock->getConstant(src);
- emitPutCTIArgConstant(value, offset);
+ emitPutJITStubArgConstant(value, argumentNumber);
} else {
loadPtr(Address(callFrameRegister, src * sizeof(Register)), scratch);
- emitPutCTIArg(scratch, offset);
+ emitPutJITStubArg(scratch, argumentNumber);
}
killLastResultRegister();