Changeset 63237 in webkit for trunk/JavaScriptCore/jit/JITOpcodes32_64.cpp
- Timestamp:
- Jul 13, 2010, 12:57:08 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/jit/JITOpcodes32_64.cpp
r61830 r63237 65 65 ret(); 66 66 #endif 67 67 68 JumpList callLinkFailures; 68 69 // (2) Trampolines for the slow cases of op_call / op_call_eval / op_construct. 69 70 #if ENABLE(JIT_OPTIMIZE_CALL) 70 JumpList callLazyLinkFailures;71 71 // VirtualCallLink Trampoline 72 72 // regT0 holds callee, regT1 holds argCount. regT2 will hold the FunctionExecutable. … … 77 77 restoreArgumentReference(); 78 78 Call callLazyLinkCall = call(); 79 callL azyLinkFailures.append(branchTestPtr(Zero, regT0));79 callLinkFailures.append(branchTestPtr(Zero, regT0)); 80 80 restoreReturnAddressBeforeReturn(regT3); 81 81 emitGetFromCallFrameHeader32(RegisterFile::ArgumentCount, regT1); … … 91 91 Call callLazyLinkConstruct = call(); 92 92 restoreReturnAddressBeforeReturn(regT3); 93 callL azyLinkFailures.append(branchTestPtr(Zero, regT0));93 callLinkFailures.append(branchTestPtr(Zero, regT0)); 94 94 emitGetFromCallFrameHeader32(RegisterFile::ArgumentCount, regT1); 95 95 jump(regT0); 96 96 97 #endif // ENABLE(JIT_OPTIMIZE_CALL) 98 99 // VirtualCall Trampoline 100 // regT0 holds callee, regT1 holds argCount. regT2 will hold the FunctionExecutable. 101 Label virtualCallBegin = align(); 102 compileOpCallInitializeCallFrame(); 103 104 loadPtr(Address(regT0, OBJECT_OFFSETOF(JSFunction, m_executable)), regT2); 105 106 Jump hasCodeBlock3 = branch32(GreaterThanOrEqual, Address(regT2, OBJECT_OFFSETOF(FunctionExecutable, m_numParametersForCall)), Imm32(0)); 107 preserveReturnAddressAfterCall(regT3); 108 restoreArgumentReference(); 109 Call callCompileCall = call(); 110 callLinkFailures.append(branchTestPtr(Zero, regT0)); 111 emitGetFromCallFrameHeader32(RegisterFile::ArgumentCount, regT1); 112 restoreReturnAddressBeforeReturn(regT3); 113 loadPtr(Address(regT0, OBJECT_OFFSETOF(JSFunction, m_executable)), regT2); 114 hasCodeBlock3.link(this); 115 116 loadPtr(Address(regT2, OBJECT_OFFSETOF(FunctionExecutable, m_jitCodeForCallWithArityCheck)), regT0); 117 jump(regT0); 118 119 // VirtualConstruct Trampoline 120 // regT0 holds callee, regT1 holds argCount. regT2 will hold the FunctionExecutable. 121 Label virtualConstructBegin = align(); 122 compileOpCallInitializeCallFrame(); 123 124 loadPtr(Address(regT0, OBJECT_OFFSETOF(JSFunction, m_executable)), regT2); 125 126 Jump hasCodeBlock4 = branch32(GreaterThanOrEqual, Address(regT2, OBJECT_OFFSETOF(FunctionExecutable, m_numParametersForConstruct)), Imm32(0)); 127 preserveReturnAddressAfterCall(regT3); 128 restoreArgumentReference(); 129 Call callCompileCconstruct = call(); 130 callLinkFailures.append(branchTestPtr(Zero, regT0)); 131 emitGetFromCallFrameHeader32(RegisterFile::ArgumentCount, regT1); 132 restoreReturnAddressBeforeReturn(regT3); 133 loadPtr(Address(regT0, OBJECT_OFFSETOF(JSFunction, m_executable)), regT2); 134 hasCodeBlock4.link(this); 135 136 loadPtr(Address(regT2, OBJECT_OFFSETOF(FunctionExecutable, m_jitCodeForConstructWithArityCheck)), regT0); 137 jump(regT0); 138 97 139 // If the parser fails we want to be able to be able to keep going, 98 140 // So we handle this as a parse failure. 99 callL azyLinkFailures.link(this);141 callLinkFailures.link(this); 100 142 emitGetFromCallFrameHeaderPtr(RegisterFile::ReturnPC, regT1); 101 143 emitGetFromCallFrameHeaderPtr(RegisterFile::CallerFrame, callFrameRegister); … … 106 148 poke(ImmPtr(FunctionPtr(ctiVMThrowTrampoline).value())); 107 149 ret(); 108 109 #endif // ENABLE(JIT_OPTIMIZE_CALL)110 111 // VirtualCall Trampoline112 // regT0 holds callee, regT1 holds argCount. regT2 will hold the FunctionExecutable.113 Label virtualCallBegin = align();114 compileOpCallInitializeCallFrame();115 116 loadPtr(Address(regT0, OBJECT_OFFSETOF(JSFunction, m_executable)), regT2);117 118 Jump hasCodeBlock3 = branch32(GreaterThanOrEqual, Address(regT2, OBJECT_OFFSETOF(FunctionExecutable, m_numParametersForCall)), Imm32(0));119 preserveReturnAddressAfterCall(regT3);120 restoreArgumentReference();121 Call callCompileCall = call();122 emitGetFromCallFrameHeader32(RegisterFile::ArgumentCount, regT1);123 restoreReturnAddressBeforeReturn(regT3);124 loadPtr(Address(regT0, OBJECT_OFFSETOF(JSFunction, m_executable)), regT2);125 hasCodeBlock3.link(this);126 127 loadPtr(Address(regT2, OBJECT_OFFSETOF(FunctionExecutable, m_jitCodeForCallWithArityCheck)), regT0);128 jump(regT0);129 130 // VirtualConstruct Trampoline131 // regT0 holds callee, regT1 holds argCount. regT2 will hold the FunctionExecutable.132 Label virtualConstructBegin = align();133 compileOpCallInitializeCallFrame();134 135 loadPtr(Address(regT0, OBJECT_OFFSETOF(JSFunction, m_executable)), regT2);136 137 Jump hasCodeBlock4 = branch32(GreaterThanOrEqual, Address(regT2, OBJECT_OFFSETOF(FunctionExecutable, m_numParametersForConstruct)), Imm32(0));138 preserveReturnAddressAfterCall(regT3);139 restoreArgumentReference();140 Call callCompileCconstruct = call();141 emitGetFromCallFrameHeader32(RegisterFile::ArgumentCount, regT1);142 restoreReturnAddressBeforeReturn(regT3);143 loadPtr(Address(regT0, OBJECT_OFFSETOF(JSFunction, m_executable)), regT2);144 hasCodeBlock4.link(this);145 146 loadPtr(Address(regT2, OBJECT_OFFSETOF(FunctionExecutable, m_jitCodeForConstructWithArityCheck)), regT0);147 jump(regT0);148 150 149 151 // NativeCall Trampoline
Note:
See TracChangeset
for help on using the changeset viewer.