From ad0d549d4cc13433f77c1ac8f0ab379c83d93f28 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Fri, 24 Feb 2012 16:36:50 +0100 Subject: Imported WebKit commit bb52bf3c0119e8a128cd93afe5572413a8617de9 (http://svn.webkit.org/repository/webkit/trunk@108790) --- Source/JavaScriptCore/jit/JITCode.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'Source/JavaScriptCore/jit/JITCode.h') 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 -- cgit v1.2.1