+2012-04-13 Gavin Barraclough <barraclough@apple.com>
+
+ Don't rely on fixed offsets to patch calls
+ https://bugs.webkit.org/show_bug.cgi?id=83966
+
+ Rubber stamped by Oliver Hunt.
+
+ These aren't being used anywhere!
+
+ * jit/JIT.h:
+ * jit/JITCall.cpp:
+ (JSC::JIT::compileOpCall):
+ * jit/JITCall32_64.cpp:
+ (JSC::JIT::compileOpCall):
+
2012-04-13 Hojong Han <hojong.han@samsung.com>
Array.prototype.toString and Array.prototype.toLocaleString should be generic
void emitSub32Constant(unsigned dst, unsigned op, int32_t constant, ResultType opType);
void emitBinaryDoubleOp(OpcodeID, unsigned dst, unsigned op1, unsigned op2, OperandTypes, JumpList& notInt32Op1, JumpList& notInt32Op2, bool op1IsInRegisters = true, bool op2IsInRegisters = true);
-#if CPU(X86)
- static const int patchOffsetOpCallCompareToJump = 6;
-#elif CPU(ARM_TRADITIONAL)
- static const int patchOffsetOpCallCompareToJump = 12;
-
+#if CPU(ARM_TRADITIONAL)
// sequenceOpCall
static const int sequenceOpCallInstructionSpace = 12;
static const int sequenceOpCallConstantSpace = 2;
// sequencePutById
static const int sequencePutByIdInstructionSpace = 36;
static const int sequencePutByIdConstantSpace = 4;
-#elif CPU(ARM_THUMB2)
- static const int patchOffsetOpCallCompareToJump = 16;
-#elif CPU(MIPS)
-#if WTF_MIPS_ISA(1)
- static const int patchOffsetOpCallCompareToJump = 32;
-#else // WTF_MIPS_ISA(1)
- static const int patchOffsetOpCallCompareToJump = 32;
-#endif
#elif CPU(SH4)
// sequenceOpCall
static const int sequenceOpCallInstructionSpace = 12;
// sequencePutById
static const int sequencePutByIdInstructionSpace = 36;
static const int sequencePutByIdConstantSpace = 5;
-
- static const int patchOffsetOpCallCompareToJump = 4;
-#else
-#error "JSVALUE32_64 not supported on this platform."
#endif
#else // USE(JSVALUE32_64)
void compileGetDirectOffset(RegisterID base, RegisterID result, RegisterID offset, RegisterID scratch);
void compilePutDirectOffset(RegisterID base, RegisterID value, size_t cachedOffset);
-#if CPU(X86_64)
- static const int patchOffsetOpCallCompareToJump = 9;
-#endif
-
#endif // USE(JSVALUE32_64)
#if (defined(ASSEMBLER_HAS_CONSTANT_POOL) && ASSEMBLER_HAS_CONSTANT_POOL)
END_UNINTERRUPTED_SEQUENCE(sequenceOpCall);
addSlowCase(slowCase);
- ASSERT_JIT_OFFSET(differenceBetween(addressOfLinkedFunctionCheck, slowCase), patchOffsetOpCallCompareToJump);
ASSERT(m_callStructureStubCompilationInfo.size() == callLinkInfoIndex);
m_callStructureStubCompilationInfo.append(StructureStubCompilationInfo());
m_callStructureStubCompilationInfo[callLinkInfoIndex].hotPathBegin = addressOfLinkedFunctionCheck;
addSlowCase(slowCase);
addSlowCase(branch32(NotEqual, regT1, TrustedImm32(JSValue::CellTag)));
- ASSERT_JIT_OFFSET(differenceBetween(addressOfLinkedFunctionCheck, slowCase), patchOffsetOpCallCompareToJump);
ASSERT(m_callStructureStubCompilationInfo.size() == callLinkInfoIndex);
m_callStructureStubCompilationInfo.append(StructureStubCompilationInfo());
m_callStructureStubCompilationInfo[callLinkInfoIndex].hotPathBegin = addressOfLinkedFunctionCheck;