diff options
Diffstat (limited to 'Source/JavaScriptCore/dfg/DFGOSRExit.cpp')
| -rw-r--r-- | Source/JavaScriptCore/dfg/DFGOSRExit.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/Source/JavaScriptCore/dfg/DFGOSRExit.cpp b/Source/JavaScriptCore/dfg/DFGOSRExit.cpp index 538a85a01..b95d4093e 100644 --- a/Source/JavaScriptCore/dfg/DFGOSRExit.cpp +++ b/Source/JavaScriptCore/dfg/DFGOSRExit.cpp @@ -30,20 +30,26 @@ #include "AssemblyHelpers.h" #include "DFGGraph.h" +#include "DFGMayExit.h" #include "DFGSpeculativeJIT.h" -#include "JSCellInlines.h" +#include "JSCInlines.h" namespace JSC { namespace DFG { OSRExit::OSRExit(ExitKind kind, JSValueSource jsValueSource, MethodOfGettingAValueProfile valueProfile, SpeculativeJIT* jit, unsigned streamIndex, unsigned recoveryIndex) - : OSRExitBase(kind, jit->m_codeOriginForExitTarget, jit->m_codeOriginForExitProfile) + : OSRExitBase(kind, jit->m_origin.forExit, jit->m_origin.semantic) , m_jsValueSource(jsValueSource) , m_valueProfile(valueProfile) , m_patchableCodeOffset(0) , m_recoveryIndex(recoveryIndex) , m_streamIndex(streamIndex) { - ASSERT(m_codeOrigin.isSet()); + bool canExit = jit->m_origin.exitOK; + if (!canExit && jit->m_currentNode) { + ExitMode exitMode = mayExit(jit->m_jit.graph(), jit->m_currentNode); + canExit = exitMode == ExitMode::Exits || exitMode == ExitMode::ExitsForExceptions; + } + DFG_ASSERT(jit->m_jit.graph(), jit->m_currentNode, canExit); } void OSRExit::setPatchableCodeOffset(MacroAssembler::PatchableJump check) |
