summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/dfg/DFGOSRExit.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/JavaScriptCore/dfg/DFGOSRExit.h')
-rw-r--r--Source/JavaScriptCore/dfg/DFGOSRExit.h39
1 files changed, 13 insertions, 26 deletions
diff --git a/Source/JavaScriptCore/dfg/DFGOSRExit.h b/Source/JavaScriptCore/dfg/DFGOSRExit.h
index c7c61686c..a14d54f84 100644
--- a/Source/JavaScriptCore/dfg/DFGOSRExit.h
+++ b/Source/JavaScriptCore/dfg/DFGOSRExit.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2011 Apple Inc. All rights reserved.
+ * Copyright (C) 2011, 2013 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,15 +26,13 @@
#ifndef DFGOSRExit_h
#define DFGOSRExit_h
-#include <wtf/Platform.h>
-
#if ENABLE(DFG_JIT)
#include "CodeOrigin.h"
#include "DFGCommon.h"
#include "DFGExitProfile.h"
-#include "DFGGPRInfo.h"
-#include "DFGValueRecoveryOverride.h"
+#include "DFGOSRExitBase.h"
+#include "GPRInfo.h"
#include "MacroAssembler.h"
#include "MethodOfGettingAValueProfile.h"
#include "Operands.h"
@@ -45,6 +43,8 @@
namespace JSC { namespace DFG {
class SpeculativeJIT;
+struct BasicBlock;
+struct Node;
// This enum describes the types of additional recovery that
// may need be performed should a speculation check fail.
@@ -82,8 +82,8 @@ private:
//
// This structure describes how to exit the speculative path by
// going into baseline code.
-struct OSRExit {
- OSRExit(ExitKind, JSValueSource, MethodOfGettingAValueProfile, SpeculativeJIT*, unsigned streamIndex, unsigned recoveryIndex = 0);
+struct OSRExit : public OSRExitBase {
+ OSRExit(ExitKind, JSValueSource, MethodOfGettingAValueProfile, SpeculativeJIT*, unsigned streamIndex, unsigned recoveryIndex = UINT_MAX);
MacroAssemblerCodeRef m_code;
@@ -91,21 +91,8 @@ struct OSRExit {
MethodOfGettingAValueProfile m_valueProfile;
unsigned m_patchableCodeOffset;
- CodeOrigin m_codeOrigin;
- CodeOrigin m_codeOriginForExitProfile;
unsigned m_recoveryIndex;
- unsigned m_watchpointIndex;
-
- ExitKind m_kind;
- uint32_t m_count;
-
- bool considerAddingAsFrequentExitSite(CodeBlock* profiledCodeBlock)
- {
- if (!m_count || !exitKindIsCountable(m_kind))
- return false;
- return considerAddingAsFrequentExitSiteSlow(profiledCodeBlock);
- }
void setPatchableCodeOffset(MacroAssembler::PatchableJump);
MacroAssembler::Jump getPatchableCodeOffsetAsJump() const;
@@ -113,16 +100,16 @@ struct OSRExit {
void correctJump(LinkBuffer&);
unsigned m_streamIndex;
- int m_lastSetOperand;
-
- RefPtr<ValueRecoveryOverride> m_valueRecoveryOverride;
-
-private:
- bool considerAddingAsFrequentExitSiteSlow(CodeBlock* profiledCodeBlock);
+ void considerAddingAsFrequentExitSite(CodeBlock* profiledCodeBlock)
+ {
+ OSRExitBase::considerAddingAsFrequentExitSite(profiledCodeBlock, ExitFromDFG);
+ }
};
struct SpeculationFailureDebugInfo {
CodeBlock* codeBlock;
+ ExitKind kind;
+ unsigned bytecodeOffset;
};
} } // namespace JSC::DFG