summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/jit/JITCode.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/JavaScriptCore/jit/JITCode.h')
-rw-r--r--Source/JavaScriptCore/jit/JITCode.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/Source/JavaScriptCore/jit/JITCode.h b/Source/JavaScriptCore/jit/JITCode.h
index f63c4a1a8..3ae5ff234 100644
--- a/Source/JavaScriptCore/jit/JITCode.h
+++ b/Source/JavaScriptCore/jit/JITCode.h
@@ -48,7 +48,7 @@ namespace JSC {
JITCode() { }
#endif
public:
- enum JITType { HostCallThunk, BaselineJIT, DFGJIT };
+ enum JITType { None, HostCallThunk, InterpreterThunk, BaselineJIT, DFGJIT };
static JITType bottomTierJIT()
{
@@ -66,8 +66,19 @@ namespace JSC {
return DFGJIT;
}
+ static bool isOptimizingJIT(JITType jitType)
+ {
+ return jitType == DFGJIT;
+ }
+
+ static bool isBaselineCode(JITType jitType)
+ {
+ return jitType == InterpreterThunk || jitType == BaselineJIT;
+ }
+
#if ENABLE(JIT)
JITCode()
+ : m_jitType(None)
{
}
@@ -75,6 +86,7 @@ namespace JSC {
: m_ref(ref)
, m_jitType(jitType)
{
+ ASSERT(jitType != None);
}
bool operator !() const