summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/jit/JSInterfaceJIT.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/JavaScriptCore/jit/JSInterfaceJIT.h')
-rw-r--r--Source/JavaScriptCore/jit/JSInterfaceJIT.h35
1 files changed, 13 insertions, 22 deletions
diff --git a/Source/JavaScriptCore/jit/JSInterfaceJIT.h b/Source/JavaScriptCore/jit/JSInterfaceJIT.h
index ac1ab7965..201e3ab2b 100644
--- a/Source/JavaScriptCore/jit/JSInterfaceJIT.h
+++ b/Source/JavaScriptCore/jit/JSInterfaceJIT.h
@@ -32,7 +32,6 @@
#include "GPRInfo.h"
#include "JITCode.h"
#include "JITOperations.h"
-#include "JITStubs.h"
#include "JSCJSValue.h"
#include "JSStack.h"
#include "JSString.h"
@@ -50,9 +49,7 @@ namespace JSC {
}
#if USE(JSVALUE32_64)
- // Can't just propogate JSValue::Int32Tag as visual studio doesn't like it
- static const unsigned Int32Tag = 0xffffffff;
- COMPILE_ASSERT(Int32Tag == JSValue::Int32Tag, Int32Tag_out_of_sync);
+ static const unsigned Int32Tag = static_cast<unsigned>(JSValue::Int32Tag);
#else
static const unsigned Int32Tag = static_cast<unsigned>(TagTypeNumber >> 32);
#endif
@@ -67,17 +64,16 @@ namespace JSC {
#if USE(JSVALUE64)
Jump emitJumpIfNotJSCell(RegisterID);
- Jump emitJumpIfImmediateNumber(RegisterID reg);
- Jump emitJumpIfNotImmediateNumber(RegisterID reg);
- void emitFastArithImmToInt(RegisterID reg);
- void emitFastArithIntToImmNoCheck(RegisterID src, RegisterID dest);
+ Jump emitJumpIfNumber(RegisterID);
+ Jump emitJumpIfNotNumber(RegisterID);
+ void emitTagInt(RegisterID src, RegisterID dest);
#endif
- Jump emitJumpIfNotType(RegisterID baseReg, RegisterID scratchReg, JSType);
+ Jump emitJumpIfNotType(RegisterID baseReg, JSType);
void emitGetFromCallFrameHeaderPtr(JSStack::CallFrameHeaderEntry, RegisterID to, RegisterID from = callFrameRegister);
void emitPutToCallFrameHeader(RegisterID from, JSStack::CallFrameHeaderEntry);
- void emitPutImmediateToCallFrameHeader(void* value, JSStack::CallFrameHeaderEntry);
+ void emitPutToCallFrameHeader(void* value, JSStack::CallFrameHeaderEntry);
void emitPutCellToCallFrameHeader(RegisterID from, JSStack::CallFrameHeaderEntry);
inline Address payloadFor(int index, RegisterID base = callFrameRegister);
@@ -156,11 +152,11 @@ namespace JSC {
return branchTest64(NonZero, reg, tagMaskRegister);
}
- ALWAYS_INLINE JSInterfaceJIT::Jump JSInterfaceJIT::emitJumpIfImmediateNumber(RegisterID reg)
+ ALWAYS_INLINE JSInterfaceJIT::Jump JSInterfaceJIT::emitJumpIfNumber(RegisterID reg)
{
return branchTest64(NonZero, reg, tagTypeNumberRegister);
}
- ALWAYS_INLINE JSInterfaceJIT::Jump JSInterfaceJIT::emitJumpIfNotImmediateNumber(RegisterID reg)
+ ALWAYS_INLINE JSInterfaceJIT::Jump JSInterfaceJIT::emitJumpIfNotNumber(RegisterID reg)
{
return branchTest64(Zero, reg, tagTypeNumberRegister);
}
@@ -181,7 +177,7 @@ namespace JSC {
inline JSInterfaceJIT::Jump JSInterfaceJIT::emitLoadDouble(unsigned virtualRegisterIndex, FPRegisterID dst, RegisterID scratch)
{
load64(addressFor(virtualRegisterIndex), scratch);
- Jump notNumber = emitJumpIfNotImmediateNumber(scratch);
+ Jump notNumber = emitJumpIfNotNumber(scratch);
Jump notInt = branch64(Below, scratch, tagTypeNumberRegister);
convertInt32ToDouble(scratch, dst);
Jump done = jump();
@@ -192,12 +188,8 @@ namespace JSC {
return notNumber;
}
- ALWAYS_INLINE void JSInterfaceJIT::emitFastArithImmToInt(RegisterID)
- {
- }
-
// operand is int32_t, must have been zero-extended if register is 64-bit.
- ALWAYS_INLINE void JSInterfaceJIT::emitFastArithIntToImmNoCheck(RegisterID src, RegisterID dest)
+ ALWAYS_INLINE void JSInterfaceJIT::emitTagInt(RegisterID src, RegisterID dest)
{
if (src != dest)
move(src, dest);
@@ -224,10 +216,9 @@ namespace JSC {
}
#endif
- ALWAYS_INLINE JSInterfaceJIT::Jump JSInterfaceJIT::emitJumpIfNotType(RegisterID baseReg, RegisterID scratchReg, JSType type)
+ ALWAYS_INLINE JSInterfaceJIT::Jump JSInterfaceJIT::emitJumpIfNotType(RegisterID baseReg, JSType type)
{
- loadPtr(Address(baseReg, JSCell::structureOffset()), scratchReg);
- return branch8(NotEqual, Address(scratchReg, Structure::typeInfoTypeOffset()), TrustedImm32(type));
+ return branch8(NotEqual, Address(baseReg, JSCell::typeInfoTypeOffset()), TrustedImm32(type));
}
ALWAYS_INLINE void JSInterfaceJIT::emitGetFromCallFrameHeaderPtr(JSStack::CallFrameHeaderEntry entry, RegisterID to, RegisterID from)
@@ -244,7 +235,7 @@ namespace JSC {
#endif
}
- ALWAYS_INLINE void JSInterfaceJIT::emitPutImmediateToCallFrameHeader(void* value, JSStack::CallFrameHeaderEntry entry)
+ ALWAYS_INLINE void JSInterfaceJIT::emitPutToCallFrameHeader(void* value, JSStack::CallFrameHeaderEntry entry)
{
storePtr(TrustedImmPtr(value), Address(callFrameRegister, entry * sizeof(Register)));
}