#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;
jit.move(JSInterfaceJIT::TrustedImmPtr(bitwise_cast<void*>(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)