diff options
Diffstat (limited to 'Source/JavaScriptCore/llint/LLIntEntrypoint.cpp')
-rw-r--r-- | Source/JavaScriptCore/llint/LLIntEntrypoint.cpp | 55 |
1 files changed, 22 insertions, 33 deletions
diff --git a/Source/JavaScriptCore/llint/LLIntEntrypoint.cpp b/Source/JavaScriptCore/llint/LLIntEntrypoint.cpp index f5918b721..993ec67b9 100644 --- a/Source/JavaScriptCore/llint/LLIntEntrypoint.cpp +++ b/Source/JavaScriptCore/llint/LLIntEntrypoint.cpp @@ -25,15 +25,14 @@ #include "config.h" #include "LLIntEntrypoint.h" + +#if ENABLE(LLINT) + #include "CodeBlock.h" -#include "HeapInlines.h" #include "JITCode.h" -#include "JSCellInlines.h" #include "JSObject.h" #include "LLIntThunks.h" #include "LowLevelInterpreter.h" -#include "MaxFrameExtentForSlowPathCall.h" -#include "StackAlignment.h" #include "VM.h" namespace JSC { namespace LLInt { @@ -46,12 +45,14 @@ static void setFunctionEntrypoint(VM& vm, CodeBlock* codeBlock) if (vm.canUseJIT()) { if (kind == CodeForCall) { codeBlock->setJITCode( - adoptRef(new DirectJITCode(vm.getCTIStub(functionForCallEntryThunkGenerator), vm.getCTIStub(functionForCallArityCheckThunkGenerator).code(), JITCode::InterpreterThunk))); + adoptRef(new DirectJITCode(vm.getCTIStub(functionForCallEntryThunkGenerator), JITCode::InterpreterThunk)), + vm.getCTIStub(functionForCallArityCheckThunkGenerator).code()); return; } ASSERT(kind == CodeForConstruct); codeBlock->setJITCode( - adoptRef(new DirectJITCode(vm.getCTIStub(functionForConstructEntryThunkGenerator), vm.getCTIStub(functionForConstructArityCheckThunkGenerator).code(), JITCode::InterpreterThunk))); + adoptRef(new DirectJITCode(vm.getCTIStub(functionForConstructEntryThunkGenerator), JITCode::InterpreterThunk)), + vm.getCTIStub(functionForConstructArityCheckThunkGenerator).code()); return; } #endif // ENABLE(JIT) @@ -59,12 +60,14 @@ static void setFunctionEntrypoint(VM& vm, CodeBlock* codeBlock) UNUSED_PARAM(vm); if (kind == CodeForCall) { codeBlock->setJITCode( - adoptRef(new DirectJITCode(MacroAssemblerCodeRef::createLLIntCodeRef(llint_function_for_call_prologue), MacroAssemblerCodePtr::createLLIntCodePtr(llint_function_for_call_arity_check), JITCode::InterpreterThunk))); + adoptRef(new DirectJITCode(MacroAssemblerCodeRef::createLLIntCodeRef(llint_function_for_call_prologue), JITCode::InterpreterThunk)), + MacroAssemblerCodePtr::createLLIntCodePtr(llint_function_for_call_arity_check)); return; } ASSERT(kind == CodeForConstruct); codeBlock->setJITCode( - adoptRef(new DirectJITCode(MacroAssemblerCodeRef::createLLIntCodeRef(llint_function_for_construct_prologue), MacroAssemblerCodePtr::createLLIntCodePtr(llint_function_for_construct_arity_check), JITCode::InterpreterThunk))); + adoptRef(new DirectJITCode(MacroAssemblerCodeRef::createLLIntCodeRef(llint_function_for_construct_prologue), JITCode::InterpreterThunk)), + MacroAssemblerCodePtr::createLLIntCodePtr(llint_function_for_construct_arity_check)); } static void setEvalEntrypoint(VM& vm, CodeBlock* codeBlock) @@ -72,14 +75,16 @@ static void setEvalEntrypoint(VM& vm, CodeBlock* codeBlock) #if ENABLE(JIT) if (vm.canUseJIT()) { codeBlock->setJITCode( - adoptRef(new DirectJITCode(vm.getCTIStub(evalEntryThunkGenerator), MacroAssemblerCodePtr(), JITCode::InterpreterThunk))); + adoptRef(new DirectJITCode(vm.getCTIStub(evalEntryThunkGenerator), JITCode::InterpreterThunk)), + MacroAssemblerCodePtr()); return; } #endif // ENABLE(JIT) UNUSED_PARAM(vm); codeBlock->setJITCode( - adoptRef(new DirectJITCode(MacroAssemblerCodeRef::createLLIntCodeRef(llint_eval_prologue), MacroAssemblerCodePtr(), JITCode::InterpreterThunk))); + adoptRef(new DirectJITCode(MacroAssemblerCodeRef::createLLIntCodeRef(llint_eval_prologue), JITCode::InterpreterThunk)), + MacroAssemblerCodePtr()); } static void setProgramEntrypoint(VM& vm, CodeBlock* codeBlock) @@ -87,29 +92,16 @@ static void setProgramEntrypoint(VM& vm, CodeBlock* codeBlock) #if ENABLE(JIT) if (vm.canUseJIT()) { codeBlock->setJITCode( - adoptRef(new DirectJITCode(vm.getCTIStub(programEntryThunkGenerator), MacroAssemblerCodePtr(), JITCode::InterpreterThunk))); + adoptRef(new DirectJITCode(vm.getCTIStub(programEntryThunkGenerator), JITCode::InterpreterThunk)), + MacroAssemblerCodePtr()); return; } #endif // ENABLE(JIT) UNUSED_PARAM(vm); codeBlock->setJITCode( - adoptRef(new DirectJITCode(MacroAssemblerCodeRef::createLLIntCodeRef(llint_program_prologue), MacroAssemblerCodePtr(), JITCode::InterpreterThunk))); -} - -static void setModuleProgramEntrypoint(VM& vm, CodeBlock* codeBlock) -{ -#if ENABLE(JIT) - if (vm.canUseJIT()) { - codeBlock->setJITCode( - adoptRef(new DirectJITCode(vm.getCTIStub(moduleProgramEntryThunkGenerator), MacroAssemblerCodePtr(), JITCode::InterpreterThunk))); - return; - } -#endif // ENABLE(JIT) - - UNUSED_PARAM(vm); - codeBlock->setJITCode( - adoptRef(new DirectJITCode(MacroAssemblerCodeRef::createLLIntCodeRef(llint_module_program_prologue), MacroAssemblerCodePtr(), JITCode::InterpreterThunk))); + adoptRef(new DirectJITCode(MacroAssemblerCodeRef::createLLIntCodeRef(llint_program_prologue), JITCode::InterpreterThunk)), + MacroAssemblerCodePtr()); } void setEntrypoint(VM& vm, CodeBlock* codeBlock) @@ -118,9 +110,6 @@ void setEntrypoint(VM& vm, CodeBlock* codeBlock) case GlobalCode: setProgramEntrypoint(vm, codeBlock); return; - case ModuleCode: - setModuleProgramEntrypoint(vm, codeBlock); - return; case EvalCode: setEvalEntrypoint(vm, codeBlock); return; @@ -134,9 +123,9 @@ void setEntrypoint(VM& vm, CodeBlock* codeBlock) unsigned frameRegisterCountFor(CodeBlock* codeBlock) { - ASSERT(static_cast<unsigned>(codeBlock->m_numCalleeLocals) == WTF::roundUpToMultipleOf(stackAlignmentRegisters(), static_cast<unsigned>(codeBlock->m_numCalleeLocals))); - - return roundLocalRegisterCountForFramePointerOffset(codeBlock->m_numCalleeLocals + maxFrameExtentForSlowPathCallInRegisters); + return codeBlock->m_numCalleeRegisters; } } } // namespace JSC::LLInt + +#endif // ENABLE(LLINT) |