m_stackIndex += stackIndexStep;
}
+ void addArgument(JIT::TrustedImm32 argument)
+ {
+ m_jit->poke(argument, m_stackIndex);
+ m_stackIndex += stackIndexStep;
+ }
+
void addArgument(JIT::Imm32 argument)
{
m_jit->poke(argument, m_stackIndex);
m_stackIndex += stackIndexStep;
}
+ void addArgument(JIT::TrustedImmPtr argument)
+ {
+ m_jit->poke(argument, m_stackIndex);
+ m_stackIndex += stackIndexStep;
+ }
+
void addArgument(JIT::ImmPtr argument)
{
m_jit->poke(argument, m_stackIndex);
m_jit->poke(argument, m_stackIndex);
m_stackIndex += stackIndexStep;
}
-
+
+#if USE(JSVALUE32_64)
void addArgument(const JSValue& value)
{
m_jit->poke(JIT::Imm32(value.payload()), m_stackIndex);
m_jit->poke(JIT::Imm32(value.tag()), m_stackIndex + 1);
m_stackIndex += stackIndexStep;
}
+#endif
void addArgument(JIT::RegisterID tag, JIT::RegisterID payload)
{
JIT::Call call()
{
#if ENABLE(OPCODE_SAMPLING)
- if (m_jit->m_bytecodeIndex != (unsigned)-1)
- m_jit->sampleInstruction(m_jit->m_codeBlock->instructions().begin() + m_jit->m_bytecodeIndex, true);
+ if (m_jit->m_bytecodeOffset != (unsigned)-1)
+ m_jit->sampleInstruction(m_jit->m_codeBlock->instructions().begin() + m_jit->m_bytecodeOffset, true);
#endif
m_jit->restoreArgumentReference();
+ m_jit->updateTopCallFrame();
JIT::Call call = m_jit->call();
- m_jit->m_calls.append(CallRecord(call, m_jit->m_bytecodeIndex, m_stub.value()));
+ m_jit->m_calls.append(CallRecord(call, m_jit->m_bytecodeOffset, m_stub.value()));
#if ENABLE(OPCODE_SAMPLING)
- if (m_jit->m_bytecodeIndex != (unsigned)-1)
- m_jit->sampleInstruction(m_jit->m_codeBlock->instructions().begin() + m_jit->m_bytecodeIndex, false);
+ if (m_jit->m_bytecodeOffset != (unsigned)-1)
+ m_jit->sampleInstruction(m_jit->m_codeBlock->instructions().begin() + m_jit->m_bytecodeOffset, false);
#endif
#if USE(JSVALUE32_64)
m_jit->emitStoreCell(dst, JIT::returnValueRegister);
return call;
}
+
+ JIT::Call callWithValueProfiling(unsigned dst)
+ {
+ ASSERT(m_returnType == Value || m_returnType == Cell);
+ JIT::Call call = this->call();
+ ASSERT(JIT::returnValueRegister == JIT::regT0);
+ if (m_returnType == Cell)
+ m_jit->move(JIT::TrustedImm32(JSValue::CellTag), JIT::regT1);
+ m_jit->emitValueProfilingSite();
+ if (m_returnType == Value)
+ m_jit->emitStore(dst, JIT::regT1, JIT::regT0);
+ else
+ m_jit->emitStoreCell(dst, JIT::returnValueRegister);
+ return call;
+ }
#else
JIT::Call call(unsigned dst) // dst is a virtual register.
{
m_jit->emitPutVirtualRegister(dst);
return call;
}
+
+ JIT::Call callWithValueProfiling(unsigned dst)
+ {
+ ASSERT(m_returnType == VoidPtr || m_returnType == Cell);
+ JIT::Call call = this->call();
+ ASSERT(JIT::returnValueRegister == JIT::regT0);
+ m_jit->emitValueProfilingSite();
+ m_jit->emitPutVirtualRegister(dst);
+ return call;
+ }
#endif
JIT::Call call(JIT::RegisterID dst) // dst is a machine register.