|
Lines 137-155
void link(State& state)
Source/JavaScriptCore/ftl/FTLLink.cpp_sec1
|
| 137 |
CCallHelpers::TrustedImm32(codeBlock->numParameters()))); |
137 |
CCallHelpers::TrustedImm32(codeBlock->numParameters()))); |
| 138 |
jit.emitFunctionPrologue(); |
138 |
jit.emitFunctionPrologue(); |
| 139 |
jit.move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR0); |
139 |
jit.move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR0); |
| 140 |
jit.store32( |
|
|
| 141 |
CCallHelpers::TrustedImm32(CallSiteIndex(0).bits()), |
| 142 |
CCallHelpers::tagFor(JSStack::ArgumentCount)); |
| 143 |
jit.storePtr(GPRInfo::callFrameRegister, &vm.topCallFrame); |
140 |
jit.storePtr(GPRInfo::callFrameRegister, &vm.topCallFrame); |
| 144 |
CCallHelpers::Call callArityCheck = jit.call(); |
141 |
CCallHelpers::Call callArityCheck = jit.call(); |
|
|
142 |
|
| 143 |
auto noException = jit.branch32(CCallHelpers::AboveOrEqual, GPRInfo::returnValueGPR, CCallHelpers::TrustedImm32(0)); |
| 144 |
jit.copyCalleeSavesToVMEntryFrameCalleeSavesBuffer(); |
| 145 |
jit.move(CCallHelpers::TrustedImmPtr(jit.vm()), GPRInfo::argumentGPR0); |
| 146 |
jit.move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR1); |
| 147 |
CCallHelpers::Call callLookupExceptionHandlerFromCallerFrame = jit.call(); |
| 148 |
jit.jumpToExceptionHandler(); |
| 149 |
noException.link(&jit); |
| 150 |
|
| 145 |
#if !ASSERT_DISABLED |
151 |
#if !ASSERT_DISABLED |
| 146 |
// FIXME: need to make this call register with exception handling somehow. This is |
|
|
| 147 |
// part of a bigger problem: FTL should be able to handle exceptions. |
| 148 |
// https://bugs.webkit.org/show_bug.cgi?id=113622 |
| 149 |
// Until then, use a JIT ASSERT. |
| 150 |
jit.load64(vm.addressOfException(), GPRInfo::regT1); |
152 |
jit.load64(vm.addressOfException(), GPRInfo::regT1); |
| 151 |
jit.jitAssertIsNull(GPRInfo::regT1); |
153 |
jit.jitAssertIsNull(GPRInfo::regT1); |
| 152 |
#endif |
154 |
#endif |
|
|
155 |
|
| 153 |
jit.move(GPRInfo::returnValueGPR, GPRInfo::argumentGPR0); |
156 |
jit.move(GPRInfo::returnValueGPR, GPRInfo::argumentGPR0); |
| 154 |
jit.emitFunctionEpilogue(); |
157 |
jit.emitFunctionEpilogue(); |
| 155 |
mainPathJumps.append(jit.branchTest32(CCallHelpers::Zero, GPRInfo::argumentGPR0)); |
158 |
mainPathJumps.append(jit.branchTest32(CCallHelpers::Zero, GPRInfo::argumentGPR0)); |
|
Lines 164-169
void link(State& state)
Source/JavaScriptCore/ftl/FTLLink.cpp_sec2
|
| 164 |
return; |
167 |
return; |
| 165 |
} |
168 |
} |
| 166 |
linkBuffer->link(callArityCheck, codeBlock->m_isConstructor ? operationConstructArityCheck : operationCallArityCheck); |
169 |
linkBuffer->link(callArityCheck, codeBlock->m_isConstructor ? operationConstructArityCheck : operationCallArityCheck); |
|
|
170 |
linkBuffer->link(callLookupExceptionHandlerFromCallerFrame, lookupExceptionHandlerFromCallerFrame); |
| 167 |
linkBuffer->link(callArityFixup, FunctionPtr((vm.getCTIStub(arityFixupGenerator)).code().executableAddress())); |
171 |
linkBuffer->link(callArityFixup, FunctionPtr((vm.getCTIStub(arityFixupGenerator)).code().executableAddress())); |
| 168 |
linkBuffer->link(mainPathJumps, CodeLocationLabel(bitwise_cast<void*>(state.generatedFunction))); |
172 |
linkBuffer->link(mainPathJumps, CodeLocationLabel(bitwise_cast<void*>(state.generatedFunction))); |
| 169 |
|
173 |
|