Title: [238991] releases/WebKitGTK/webkit-2.22/Source/_javascript_Core
- Revision
- 238991
- Author
- [email protected]
- Date
- 2018-12-07 16:25:52 -0800 (Fri, 07 Dec 2018)
Log Message
Merge r236585 - 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: releases/WebKitGTK/webkit-2.22/Source/_javascript_Core/ChangeLog (238990 => 238991)
--- releases/WebKitGTK/webkit-2.22/Source/_javascript_Core/ChangeLog 2018-12-08 00:25:49 UTC (rev 238990)
+++ releases/WebKitGTK/webkit-2.22/Source/_javascript_Core/ChangeLog 2018-12-08 00:25:52 UTC (rev 238991)
@@ -1,5 +1,25 @@
2018-09-27 Saam barati <[email protected]>
+ 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]>
+
Don't use int offsets in StructureStubInfo
https://bugs.webkit.org/show_bug.cgi?id=190064
<rdar://problem/44784719>
Modified: releases/WebKitGTK/webkit-2.22/Source/_javascript_Core/dfg/DFGJITCompiler.cpp (238990 => 238991)
--- releases/WebKitGTK/webkit-2.22/Source/_javascript_Core/dfg/DFGJITCompiler.cpp 2018-12-08 00:25:49 UTC (rev 238990)
+++ releases/WebKitGTK/webkit-2.22/Source/_javascript_Core/dfg/DFGJITCompiler.cpp 2018-12-08 00:25:52 UTC (rev 238991)
@@ -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: releases/WebKitGTK/webkit-2.22/Source/_javascript_Core/dfg/DFGOSRExit.cpp (238990 => 238991)
--- releases/WebKitGTK/webkit-2.22/Source/_javascript_Core/dfg/DFGOSRExit.cpp 2018-12-08 00:25:49 UTC (rev 238990)
+++ releases/WebKitGTK/webkit-2.22/Source/_javascript_Core/dfg/DFGOSRExit.cpp 2018-12-08 00:25:52 UTC (rev 238991)
@@ -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: releases/WebKitGTK/webkit-2.22/Source/_javascript_Core/dfg/DFGOSRExit.h (238990 => 238991)
--- releases/WebKitGTK/webkit-2.22/Source/_javascript_Core/dfg/DFGOSRExit.h 2018-12-08 00:25:49 UTC (rev 238990)
+++ releases/WebKitGTK/webkit-2.22/Source/_javascript_Core/dfg/DFGOSRExit.h 2018-12-08 00:25:52 UTC (rev 238991)
@@ -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: releases/WebKitGTK/webkit-2.22/Source/_javascript_Core/dfg/DFGOSRExitCompilationInfo.h (238990 => 238991)
--- releases/WebKitGTK/webkit-2.22/Source/_javascript_Core/dfg/DFGOSRExitCompilationInfo.h 2018-12-08 00:25:49 UTC (rev 238990)
+++ releases/WebKitGTK/webkit-2.22/Source/_javascript_Core/dfg/DFGOSRExitCompilationInfo.h 2018-12-08 00:25:52 UTC (rev 238991)
@@ -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