X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/a253471d7f8e4d91bf6ebabab00155c3b387d3d0..93a3786624b2768d89bfa27e46598dc64e2fb70a:/llint/LLIntThunks.cpp diff --git a/llint/LLIntThunks.cpp b/llint/LLIntThunks.cpp index b4d0264..fe57aa3 100644 --- a/llint/LLIntThunks.cpp +++ b/llint/LLIntThunks.cpp @@ -32,11 +32,13 @@ #include "JSObject.h" #include "LinkBuffer.h" #include "LowLevelInterpreter.h" -#include "ScopeChain.h" + namespace JSC { namespace LLInt { -static MacroAssemblerCodeRef generateThunkWithJumpTo(JSGlobalData* globalData, void (*target)()) +#if !ENABLE(LLINT_C_LOOP) + +static MacroAssemblerCodeRef generateThunkWithJumpTo(VM* vm, void (*target)(), const char *thunkKind) { JSInterfaceJIT jit; @@ -44,40 +46,42 @@ static MacroAssemblerCodeRef generateThunkWithJumpTo(JSGlobalData* globalData, v jit.move(JSInterfaceJIT::TrustedImmPtr(bitwise_cast(target)), JSInterfaceJIT::regT0); jit.jump(JSInterfaceJIT::regT0); - LinkBuffer patchBuffer(*globalData, &jit, GLOBAL_THUNK_ID); - return patchBuffer.finalizeCode(); + LinkBuffer patchBuffer(*vm, &jit, GLOBAL_THUNK_ID); + return FINALIZE_CODE(patchBuffer, ("LLInt %s prologue thunk", thunkKind)); } -MacroAssemblerCodeRef functionForCallEntryThunkGenerator(JSGlobalData* globalData) +MacroAssemblerCodeRef functionForCallEntryThunkGenerator(VM* vm) { - return generateThunkWithJumpTo(globalData, llint_function_for_call_prologue); + return generateThunkWithJumpTo(vm, llint_function_for_call_prologue, "function for call"); } -MacroAssemblerCodeRef functionForConstructEntryThunkGenerator(JSGlobalData* globalData) +MacroAssemblerCodeRef functionForConstructEntryThunkGenerator(VM* vm) { - return generateThunkWithJumpTo(globalData, llint_function_for_construct_prologue); + return generateThunkWithJumpTo(vm, llint_function_for_construct_prologue, "function for construct"); } -MacroAssemblerCodeRef functionForCallArityCheckThunkGenerator(JSGlobalData* globalData) +MacroAssemblerCodeRef functionForCallArityCheckThunkGenerator(VM* vm) { - return generateThunkWithJumpTo(globalData, llint_function_for_call_arity_check); + return generateThunkWithJumpTo(vm, llint_function_for_call_arity_check, "function for call with arity check"); } -MacroAssemblerCodeRef functionForConstructArityCheckThunkGenerator(JSGlobalData* globalData) +MacroAssemblerCodeRef functionForConstructArityCheckThunkGenerator(VM* vm) { - return generateThunkWithJumpTo(globalData, llint_function_for_construct_arity_check); + return generateThunkWithJumpTo(vm, llint_function_for_construct_arity_check, "function for construct with arity check"); } -MacroAssemblerCodeRef evalEntryThunkGenerator(JSGlobalData* globalData) +MacroAssemblerCodeRef evalEntryThunkGenerator(VM* vm) { - return generateThunkWithJumpTo(globalData, llint_eval_prologue); + return generateThunkWithJumpTo(vm, llint_eval_prologue, "eval"); } -MacroAssemblerCodeRef programEntryThunkGenerator(JSGlobalData* globalData) +MacroAssemblerCodeRef programEntryThunkGenerator(VM* vm) { - return generateThunkWithJumpTo(globalData, llint_program_prologue); + return generateThunkWithJumpTo(vm, llint_program_prologue, "program"); } +#endif // !ENABLE(LLINT_C_LOOP) + } } // namespace JSC::LLInt #endif // ENABLE(LLINT)