Changeset 209678 in webkit for trunk/Source/JavaScriptCore/llint/LLIntThunks.cpp
- Timestamp:
- Dec 10, 2016, 5:14:37 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/llint/LLIntThunks.cpp
r209653 r209678 52 52 namespace LLInt { 53 53 54 enum ShouldCreateRegisterEntry { CreateRegisterEntry, DontCreateRegisterEntry }; 55 56 static MacroAssemblerCodeRef generateThunkWithJumpTo(VM* vm, void (*target)(), const char *thunkKind, ShouldCreateRegisterEntry shouldCreateRegisterEntry = DontCreateRegisterEntry) 54 static MacroAssemblerCodeRef generateThunkWithJumpTo(VM* vm, void (*target)(), const char *thunkKind) 57 55 { 58 56 JSInterfaceJIT jit(vm); 59 60 #if USE(JSVALUE64) 61 if (shouldCreateRegisterEntry == CreateRegisterEntry) 62 jit.spillArgumentRegistersToFrameBeforePrologue(); 63 #else 64 UNUSED_PARAM(shouldCreateRegisterEntry); 65 #endif 66 57 67 58 // FIXME: there's probably a better way to do it on X86, but I'm not sure I care. 68 59 jit.move(JSInterfaceJIT::TrustedImmPtr(bitwise_cast<void*>(target)), JSInterfaceJIT::regT0); … … 73 64 } 74 65 75 MacroAssemblerCodeRef functionFor RegisterCallEntryThunkGenerator(VM* vm)66 MacroAssemblerCodeRef functionForCallEntryThunkGenerator(VM* vm) 76 67 { 77 return generateThunkWithJumpTo(vm, LLInt::getCodeFunctionPtr(llint_function_for_call_prologue), "function for register args call", CreateRegisterEntry);68 return generateThunkWithJumpTo(vm, LLInt::getCodeFunctionPtr(llint_function_for_call_prologue), "function for call"); 78 69 } 79 70 80 MacroAssemblerCodeRef functionFor StackCallEntryThunkGenerator(VM* vm)71 MacroAssemblerCodeRef functionForConstructEntryThunkGenerator(VM* vm) 81 72 { 82 return generateThunkWithJumpTo(vm, LLInt::getCodeFunctionPtr(llint_function_for_c all_prologue), "function for stack args call");73 return generateThunkWithJumpTo(vm, LLInt::getCodeFunctionPtr(llint_function_for_construct_prologue), "function for construct"); 83 74 } 84 75 85 MacroAssemblerCodeRef functionFor RegisterConstructEntryThunkGenerator(VM* vm)76 MacroAssemblerCodeRef functionForCallArityCheckThunkGenerator(VM* vm) 86 77 { 87 return generateThunkWithJumpTo(vm, LLInt::getCodeFunctionPtr(llint_function_for_c onstruct_prologue), "function for register args construct", CreateRegisterEntry);78 return generateThunkWithJumpTo(vm, LLInt::getCodeFunctionPtr(llint_function_for_call_arity_check), "function for call with arity check"); 88 79 } 89 80 90 MacroAssemblerCodeRef functionFor StackConstructEntryThunkGenerator(VM* vm)81 MacroAssemblerCodeRef functionForConstructArityCheckThunkGenerator(VM* vm) 91 82 { 92 return generateThunkWithJumpTo(vm, LLInt::getCodeFunctionPtr(llint_function_for_construct_prologue), "function for stack args construct"); 93 } 94 95 MacroAssemblerCodeRef functionForRegisterCallArityCheckThunkGenerator(VM* vm) 96 { 97 return generateThunkWithJumpTo(vm, LLInt::getCodeFunctionPtr(llint_function_for_call_arity_check), "function for register args call with arity check", CreateRegisterEntry); 98 } 99 100 MacroAssemblerCodeRef functionForStackCallArityCheckThunkGenerator(VM* vm) 101 { 102 return generateThunkWithJumpTo(vm, LLInt::getCodeFunctionPtr(llint_function_for_call_arity_check), "function for stack args call with arity check"); 103 } 104 105 MacroAssemblerCodeRef functionForRegisterConstructArityCheckThunkGenerator(VM* vm) 106 { 107 return generateThunkWithJumpTo(vm, LLInt::getCodeFunctionPtr(llint_function_for_construct_arity_check), "function for register args construct with arity check", CreateRegisterEntry); 108 } 109 110 MacroAssemblerCodeRef functionForStackConstructArityCheckThunkGenerator(VM* vm) 111 { 112 return generateThunkWithJumpTo(vm, LLInt::getCodeFunctionPtr(llint_function_for_construct_arity_check), "function for stack args construct with arity check"); 83 return generateThunkWithJumpTo(vm, LLInt::getCodeFunctionPtr(llint_function_for_construct_arity_check), "function for construct with arity check"); 113 84 } 114 85
Note:
See TracChangeset
for help on using the changeset viewer.