From 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 27 Jun 2017 06:07:23 +0000 Subject: webkitgtk-2.16.5 --- Source/JavaScriptCore/dfg/DFGOSRExit.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'Source/JavaScriptCore/dfg/DFGOSRExit.cpp') diff --git a/Source/JavaScriptCore/dfg/DFGOSRExit.cpp b/Source/JavaScriptCore/dfg/DFGOSRExit.cpp index 538a85a01..2c968c440 100644 --- a/Source/JavaScriptCore/dfg/DFGOSRExit.cpp +++ b/Source/JavaScriptCore/dfg/DFGOSRExit.cpp @@ -30,20 +30,25 @@ #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, jit->m_origin.wasHoisted) , 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) -- cgit v1.2.1