DFG speculation checks that take JumpList should consolidate OSRExits
https://bugs.webkit.org/show_bug.cgi?id=105401
Reviewed by Oliver Hunt.
Source/JavaScriptCore:
Change OSRExitCompilationInfo to always contain a JumpList, and change JumpList
to be more compact. This way, a speculationCheck that takes a JumpList only has
to emit one OSRExit structure, and one OSRExit landing pad.
The downside is that we get less precise information about *where* we exited
from. So, this also includes changes to the profiler to be more relaxed about
what an ExitSite is.
- assembler/AbstractMacroAssembler.h:
(JumpList):
(JSC::DFG::JITCompiler::linkOSRExits):
(JSC::DFG::JITCompiler::link):
(DFG):
(JSC::DFG::JITCompiler::appendExitInfo):
(JITCompiler):
- dfg/DFGOSRExitCompilationInfo.h:
(OSRExitCompilationInfo):
- dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::speculationCheck):
(JSC::DFG::SpeculativeJIT::speculationWatchpoint):
(JSC::DFG::SpeculativeJIT::forwardSpeculationCheck):
- profiler/ProfilerCompilation.cpp:
(JSC::Profiler::Compilation::addOSRExitSite):
- profiler/ProfilerCompilation.h:
(Compilation):
- profiler/ProfilerOSRExitSite.cpp:
(JSC::Profiler::OSRExitSite::toJS):
- profiler/ProfilerOSRExitSite.h:
(JSC::Profiler::OSRExitSite::OSRExitSite):
(JSC::Profiler::OSRExitSite::codeAddress):
(OSRExitSite):
Tools:
Update the profiler to understand that an OSR exit may have multiple
candidate exit sites.
- Scripts/display-profiler-output: