X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/6fe7ccc865dc7d7541b93c5bcaf6368d2c98a174..217a6308cd6a1dc049a0bb69263bd4c91f91c4d0:/dfg/DFGAssemblyHelpers.cpp diff --git a/dfg/DFGAssemblyHelpers.cpp b/dfg/DFGAssemblyHelpers.cpp index 15f6d19..ca8683e 100644 --- a/dfg/DFGAssemblyHelpers.cpp +++ b/dfg/DFGAssemblyHelpers.cpp @@ -30,7 +30,13 @@ namespace JSC { namespace DFG { -const double AssemblyHelpers::twoToThe32 = (double)0x100000000ull; +ExecutableBase* AssemblyHelpers::executableFor(const CodeOrigin& codeOrigin) +{ + if (!codeOrigin.inlineCallFrame) + return m_codeBlock->ownerExecutable(); + + return codeOrigin.inlineCallFrame->executable.get(); +} Vector& AssemblyHelpers::decodedCodeMapFor(CodeBlock* codeBlock) { @@ -41,9 +47,9 @@ Vector& AssemblyHelpers::decodedCodeMapFor(CodeBlock* HashMap >::AddResult result = m_decodedCodeMaps.add(codeBlock, Vector()); if (result.isNewEntry) - codeBlock->jitCodeMap()->decode(result.iterator->second); + codeBlock->jitCodeMap()->decode(result.iterator->value); - return result.iterator->second; + return result.iterator->value; } #if ENABLE(SAMPLING_FLAGS) @@ -67,7 +73,7 @@ void AssemblyHelpers::clearSamplingFlag(int32_t flag) void AssemblyHelpers::jitAssertIsInt32(GPRReg gpr) { #if CPU(X86_64) - Jump checkInt32 = branchPtr(BelowOrEqual, gpr, TrustedImmPtr(reinterpret_cast(static_cast(0xFFFFFFFFu)))); + Jump checkInt32 = branch64(BelowOrEqual, gpr, TrustedImm64(static_cast(0xFFFFFFFFu))); breakpoint(); checkInt32.link(this); #else @@ -77,22 +83,22 @@ void AssemblyHelpers::jitAssertIsInt32(GPRReg gpr) void AssemblyHelpers::jitAssertIsJSInt32(GPRReg gpr) { - Jump checkJSInt32 = branchPtr(AboveOrEqual, gpr, GPRInfo::tagTypeNumberRegister); + Jump checkJSInt32 = branch64(AboveOrEqual, gpr, GPRInfo::tagTypeNumberRegister); breakpoint(); checkJSInt32.link(this); } void AssemblyHelpers::jitAssertIsJSNumber(GPRReg gpr) { - Jump checkJSNumber = branchTestPtr(MacroAssembler::NonZero, gpr, GPRInfo::tagTypeNumberRegister); + Jump checkJSNumber = branchTest64(MacroAssembler::NonZero, gpr, GPRInfo::tagTypeNumberRegister); breakpoint(); checkJSNumber.link(this); } void AssemblyHelpers::jitAssertIsJSDouble(GPRReg gpr) { - Jump checkJSInt32 = branchPtr(AboveOrEqual, gpr, GPRInfo::tagTypeNumberRegister); - Jump checkJSNumber = branchTestPtr(MacroAssembler::NonZero, gpr, GPRInfo::tagTypeNumberRegister); + Jump checkJSInt32 = branch64(AboveOrEqual, gpr, GPRInfo::tagTypeNumberRegister); + Jump checkJSNumber = branchTest64(MacroAssembler::NonZero, gpr, GPRInfo::tagTypeNumberRegister); checkJSInt32.link(this); breakpoint(); checkJSNumber.link(this); @@ -100,7 +106,7 @@ void AssemblyHelpers::jitAssertIsJSDouble(GPRReg gpr) void AssemblyHelpers::jitAssertIsCell(GPRReg gpr) { - Jump checkCell = branchTestPtr(MacroAssembler::Zero, gpr, GPRInfo::tagMaskRegister); + Jump checkCell = branchTest64(MacroAssembler::Zero, gpr, GPRInfo::tagMaskRegister); breakpoint(); checkCell.link(this); }