Title: [236588] branches/safari-606-branch/Source/_javascript_Core
- Revision
- 236588
- Author
- [email protected]
- Date
- 2018-09-27 22:07:15 -0700 (Thu, 27 Sep 2018)
Log Message
Cherry-pick r236585. rdar://problem/44848947
DFG::OSRExit::m_patchableCodeOffset should not be an int
https://bugs.webkit.org/show_bug.cgi?id=190066
<rdar://problem/39498244>
Reviewed by Mark Lam.
dfg/DFGJITCompiler.cpp:
(JSC::DFG::JITCompiler::linkOSRExits):
(JSC::DFG::JITCompiler::link):
dfg/DFGOSRExit.cpp:
(JSC::DFG::OSRExit::codeLocationForRepatch const):
(JSC::DFG::OSRExit::compileOSRExit):
(JSC::DFG::OSRExit::setPatchableCodeOffset): Deleted.
(JSC::DFG::OSRExit::getPatchableCodeOffsetAsJump const): Deleted.
(JSC::DFG::OSRExit::correctJump): Deleted.
dfg/DFGOSRExit.h:
dfg/DFGOSRExitCompilationInfo.h:
Modified Paths
Diff
Modified: branches/safari-606-branch/Source/_javascript_Core/ChangeLog (236587 => 236588)
--- branches/safari-606-branch/Source/_javascript_Core/ChangeLog 2018-09-28 05:07:03 UTC (rev 236587)
+++ branches/safari-606-branch/Source/_javascript_Core/ChangeLog 2018-09-28 05:07:15 UTC (rev 236588)
@@ -1,5 +1,29 @@
2018-09-27 Saam barati <[email protected]>
+ Cherry-pick r236585. rdar://problem/44848947
+
+ DFG::OSRExit::m_patchableCodeOffset should not be an int
+ https://bugs.webkit.org/show_bug.cgi?id=190066
+ <rdar://problem/39498244>
+
+ Reviewed by Mark Lam.
+
+ dfg/DFGJITCompiler.cpp:
+ (JSC::DFG::JITCompiler::linkOSRExits):
+ (JSC::DFG::JITCompiler::link):
+
+ dfg/DFGOSRExit.cpp:
+ (JSC::DFG::OSRExit::codeLocationForRepatch const):
+ (JSC::DFG::OSRExit::compileOSRExit):
+ (JSC::DFG::OSRExit::setPatchableCodeOffset): Deleted.
+ (JSC::DFG::OSRExit::getPatchableCodeOffsetAsJump const): Deleted.
+ (JSC::DFG::OSRExit::correctJump): Deleted.
+
+ dfg/DFGOSRExit.h:
+ dfg/DFGOSRExitCompilationInfo.h:
+
+2018-09-27 Saam barati <[email protected]>
+
Cherry-pick r236584. rdar://problem/44848936
Don't use int offsets in StructureStubInfo
Modified: branches/safari-606-branch/Source/_javascript_Core/dfg/DFGJITCompiler.cpp (236587 => 236588)
--- branches/safari-606-branch/Source/_javascript_Core/dfg/DFGJITCompiler.cpp 2018-09-28 05:07:03 UTC (rev 236587)
+++ branches/safari-606-branch/Source/_javascript_Core/dfg/DFGJITCompiler.cpp 2018-09-28 05:07:15 UTC (rev 236588)
@@ -102,10 +102,8 @@
addLinkTask([target, osrExitThunkLabel] (LinkBuffer& linkBuffer) {
linkBuffer.link(target, osrExitThunkLabel);
});
- } else {
- OSRExit& exit = m_jitCode->osrExit[i];
- exit.setPatchableCodeOffset(patchableJump());
- }
+ } else
+ info.m_patchableJump = patchableJump();
}
}
@@ -300,9 +298,9 @@
for (unsigned i = 0; i < m_jitCode->osrExit.size(); ++i) {
OSRExitCompilationInfo& info = m_exitCompilationInfo[i];
if (!Options::useProbeOSRExit()) {
+ linkBuffer.link(info.m_patchableJump.m_jump, target);
OSRExit& exit = m_jitCode->osrExit[i];
- linkBuffer.link(exit.getPatchableCodeOffsetAsJump(), target);
- exit.correctJump(linkBuffer);
+ exit.m_patchableJumpLocation = linkBuffer.locationOf<JSInternalPtrTag>(info.m_patchableJump);
}
if (info.m_replacementSource.isSet()) {
m_jitCode->common.jumpReplacements.append(JumpReplacement(
Modified: branches/safari-606-branch/Source/_javascript_Core/dfg/DFGOSRExit.cpp (236587 => 236588)
--- branches/safari-606-branch/Source/_javascript_Core/dfg/DFGOSRExit.cpp 2018-09-28 05:07:03 UTC (rev 236587)
+++ branches/safari-606-branch/Source/_javascript_Core/dfg/DFGOSRExit.cpp 2018-09-28 05:07:15 UTC (rev 236588)
@@ -921,28 +921,11 @@
DFG_ASSERT(jit->m_jit.graph(), jit->m_currentNode, canExit);
}
-void OSRExit::setPatchableCodeOffset(MacroAssembler::PatchableJump check)
+CodeLocationJump<JSInternalPtrTag> OSRExit::codeLocationForRepatch() const
{
- m_patchableCodeOffset = check.m_jump.m_label.m_offset;
+ return CodeLocationJump<JSInternalPtrTag>(m_patchableJumpLocation);
}
-MacroAssembler::Jump OSRExit::getPatchableCodeOffsetAsJump() const
-{
- return MacroAssembler::Jump(AssemblerLabel(m_patchableCodeOffset));
-}
-
-CodeLocationJump<JSInternalPtrTag> OSRExit::codeLocationForRepatch(CodeBlock* dfgCodeBlock) const
-{
- return CodeLocationJump<JSInternalPtrTag>(tagCodePtr<JSInternalPtrTag>(dfgCodeBlock->jitCode()->dataAddressAtOffset(m_patchableCodeOffset)));
-}
-
-void OSRExit::correctJump(LinkBuffer& linkBuffer)
-{
- MacroAssembler::Label label;
- label.m_label.m_offset = m_patchableCodeOffset;
- m_patchableCodeOffset = linkBuffer.offsetOf(label);
-}
-
void OSRExit::emitRestoreArguments(CCallHelpers& jit, const Operands<ValueRecovery>& operands)
{
HashMap<MinifiedID, int> alreadyAllocatedArguments; // Maps phantom arguments node ID to operand.
@@ -1082,7 +1065,7 @@
toCString(ignoringContext<DumpContext>(operands)).data());
}
- MacroAssembler::repatchJump(exit.codeLocationForRepatch(codeBlock), CodeLocationLabel<OSRExitPtrTag>(exit.m_code.code()));
+ MacroAssembler::repatchJump(exit.codeLocationForRepatch(), CodeLocationLabel<OSRExitPtrTag>(exit.m_code.code()));
vm->osrExitJumpDestination = exit.m_code.code().executableAddress();
}
Modified: branches/safari-606-branch/Source/_javascript_Core/dfg/DFGOSRExit.h (236587 => 236588)
--- branches/safari-606-branch/Source/_javascript_Core/dfg/DFGOSRExit.h 2018-09-28 05:07:03 UTC (rev 236587)
+++ branches/safari-606-branch/Source/_javascript_Core/dfg/DFGOSRExit.h 2018-09-28 05:07:15 UTC (rev 236588)
@@ -145,8 +145,7 @@
static void JIT_OPERATION compileOSRExit(ExecState*) WTF_INTERNAL;
static void executeOSRExit(Probe::Context&);
- // FIXME: <rdar://problem/39498244>.
- unsigned m_patchableCodeOffset { 0 };
+ CodeLocationLabel<JSInternalPtrTag> m_patchableJumpLocation;
MacroAssemblerCodeRef<OSRExitPtrTag> m_code;
RefPtr<OSRExitState> exitState;
@@ -156,10 +155,7 @@
unsigned m_recoveryIndex;
- void setPatchableCodeOffset(MacroAssembler::PatchableJump);
- MacroAssembler::Jump getPatchableCodeOffsetAsJump() const;
- CodeLocationJump<JSInternalPtrTag> codeLocationForRepatch(CodeBlock*) const;
- void correctJump(LinkBuffer&);
+ CodeLocationJump<JSInternalPtrTag> codeLocationForRepatch() const;
unsigned m_streamIndex;
void considerAddingAsFrequentExitSite(CodeBlock* profiledCodeBlock)
Modified: branches/safari-606-branch/Source/_javascript_Core/dfg/DFGOSRExitCompilationInfo.h (236587 => 236588)
--- branches/safari-606-branch/Source/_javascript_Core/dfg/DFGOSRExitCompilationInfo.h 2018-09-28 05:07:03 UTC (rev 236587)
+++ branches/safari-606-branch/Source/_javascript_Core/dfg/DFGOSRExitCompilationInfo.h 2018-09-28 05:07:15 UTC (rev 236588)
@@ -35,6 +35,7 @@
MacroAssembler::JumpList m_failureJumps;
MacroAssembler::Label m_replacementSource;
MacroAssembler::Label m_replacementDestination;
+ MacroAssembler::PatchableJump m_patchableJump;
};
} } // namespace JSC::DFG
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes