summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/dfg/DFGOSRExit.cpp
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
commit1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch)
tree46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/JavaScriptCore/dfg/DFGOSRExit.cpp
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/JavaScriptCore/dfg/DFGOSRExit.cpp')
-rw-r--r--Source/JavaScriptCore/dfg/DFGOSRExit.cpp13
1 files changed, 9 insertions, 4 deletions
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)