]> git.saurik.com Git - apple/javascriptcore.git/blobdiff - llint/LLIntEntrypoints.cpp
JavaScriptCore-1218.tar.gz
[apple/javascriptcore.git] / llint / LLIntEntrypoints.cpp
index dd7d9433d569832b6d2784027bb121ac49adfed3..c044568b5768b06c596e5db356391372c66ec84d 100644 (file)
 #if ENABLE(LLINT)
 
 #include "JITCode.h"
-#include "JSGlobalData.h"
+#include "VM.h"
 #include "JSObject.h"
 #include "LLIntThunks.h"
 #include "LowLevelInterpreter.h"
-#include "ScopeChain.h"
+
 
 namespace JSC { namespace LLInt {
 
-void getFunctionEntrypoint(JSGlobalData& globalData, CodeSpecializationKind kind, JITCode& jitCode, MacroAssemblerCodePtr& arityCheck)
+void getFunctionEntrypoint(VM& vm, CodeSpecializationKind kind, JITCode& jitCode, MacroAssemblerCodePtr& arityCheck)
 {
-    if (!globalData.canUseJIT()) {
+    if (!vm.canUseJIT()) {
         if (kind == CodeForCall) {
             jitCode = JITCode(MacroAssemblerCodeRef::createLLIntCodeRef(llint_function_for_call_prologue), JITCode::InterpreterThunk);
             arityCheck = MacroAssemblerCodePtr::createLLIntCodePtr(llint_function_for_call_arity_check);
@@ -52,35 +52,39 @@ void getFunctionEntrypoint(JSGlobalData& globalData, CodeSpecializationKind kind
         return;
     }
     
+#if ENABLE(JIT)
     if (kind == CodeForCall) {
-        jitCode = JITCode(globalData.getCTIStub(functionForCallEntryThunkGenerator), JITCode::InterpreterThunk);
-        arityCheck = globalData.getCTIStub(functionForCallArityCheckThunkGenerator).code();
+        jitCode = JITCode(vm.getCTIStub(functionForCallEntryThunkGenerator), JITCode::InterpreterThunk);
+        arityCheck = vm.getCTIStub(functionForCallArityCheckThunkGenerator).code();
         return;
     }
 
     ASSERT(kind == CodeForConstruct);
-    jitCode = JITCode(globalData.getCTIStub(functionForConstructEntryThunkGenerator), JITCode::InterpreterThunk);
-    arityCheck = globalData.getCTIStub(functionForConstructArityCheckThunkGenerator).code();
+    jitCode = JITCode(vm.getCTIStub(functionForConstructEntryThunkGenerator), JITCode::InterpreterThunk);
+    arityCheck = vm.getCTIStub(functionForConstructArityCheckThunkGenerator).code();
+#endif // ENABLE(JIT)
 }
 
-void getEvalEntrypoint(JSGlobalData& globalData, JITCode& jitCode)
+void getEvalEntrypoint(VM& vm, JITCode& jitCode)
 {
-    if (!globalData.canUseJIT()) {
+    if (!vm.canUseJIT()) {
         jitCode = JITCode(MacroAssemblerCodeRef::createLLIntCodeRef(llint_eval_prologue), JITCode::InterpreterThunk);
         return;
     }
-    
-    jitCode = JITCode(globalData.getCTIStub(evalEntryThunkGenerator), JITCode::InterpreterThunk);
+#if ENABLE(JIT)    
+    jitCode = JITCode(vm.getCTIStub(evalEntryThunkGenerator), JITCode::InterpreterThunk);
+#endif
 }
 
-void getProgramEntrypoint(JSGlobalData& globalData, JITCode& jitCode)
+void getProgramEntrypoint(VM& vm, JITCode& jitCode)
 {
-    if (!globalData.canUseJIT()) {
+    if (!vm.canUseJIT()) {
         jitCode = JITCode(MacroAssemblerCodeRef::createLLIntCodeRef(llint_program_prologue), JITCode::InterpreterThunk);
         return;
     }
-    
-    jitCode = JITCode(globalData.getCTIStub(programEntryThunkGenerator), JITCode::InterpreterThunk);
+#if ENABLE(JIT)
+    jitCode = JITCode(vm.getCTIStub(programEntryThunkGenerator), JITCode::InterpreterThunk);
+#endif
 }
 
 } } // namespace JSC::LLInt