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/JITDriver.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'Source/JavaScriptCore/jit/JITDriver.h') diff --git a/Source/JavaScriptCore/jit/JITDriver.h b/Source/JavaScriptCore/jit/JITDriver.h index 4b8df4751..b204c7737 100644 --- a/Source/JavaScriptCore/jit/JITDriver.h +++ b/Source/JavaScriptCore/jit/JITDriver.h @@ -33,15 +33,21 @@ #include "BytecodeGenerator.h" #include "DFGDriver.h" #include "JIT.h" +#include "LLIntEntrypoints.h" namespace JSC { template inline bool jitCompileIfAppropriate(JSGlobalData& globalData, OwnPtr& codeBlock, JITCode& jitCode, JITCode::JITType jitType) { + if (jitType == codeBlock->getJITType()) + return true; + if (!globalData.canUseJIT()) return true; + codeBlock->unlinkIncomingCalls(); + bool dfgCompiled = false; if (jitType == JITCode::DFGJIT) dfgCompiled = DFG::tryCompile(globalData, codeBlock.get(), jitCode); @@ -62,9 +68,14 @@ inline bool jitCompileIfAppropriate(JSGlobalData& globalData, OwnPtr& codeBlock, JITCode& jitCode, MacroAssemblerCodePtr& jitCodeWithArityCheck, SharedSymbolTable*& symbolTable, JITCode::JITType jitType) { + if (jitType == codeBlock->getJITType()) + return true; + if (!globalData.canUseJIT()) return true; + codeBlock->unlinkIncomingCalls(); + bool dfgCompiled = false; if (jitType == JITCode::DFGJIT) dfgCompiled = DFG::tryCompileFunction(globalData, codeBlock.get(), jitCode, jitCodeWithArityCheck); @@ -79,7 +90,6 @@ inline bool jitCompileFunctionIfAppropriate(JSGlobalData& globalData, OwnPtrsetJITCode(jitCode, jitCodeWithArityCheck); return true; -- cgit v1.2.1