|
Lines 121-142
void JITCompiler::compileExceptionHandle
Source/JavaScriptCore/dfg/DFGJITCompiler.cpp_sec1
|
| 121 |
|
121 |
|
| 122 |
if (!m_exceptionChecksWithCallFrameRollback.empty()) { |
122 |
if (!m_exceptionChecksWithCallFrameRollback.empty()) { |
| 123 |
m_exceptionChecksWithCallFrameRollback.link(this); |
123 |
m_exceptionChecksWithCallFrameRollback.link(this); |
| 124 |
emitGetCallerFrameFromCallFrameHeaderPtr(GPRInfo::argumentGPR0); |
124 |
emitGetCallerFrameFromCallFrameHeaderPtr(GPRInfo::argumentGPR1); |
| 125 |
doLookup = jump(); |
125 |
doLookup = jump(); |
| 126 |
} |
126 |
} |
| 127 |
|
127 |
|
| 128 |
if (!m_exceptionChecks.empty()) |
128 |
if (!m_exceptionChecks.empty()) |
| 129 |
m_exceptionChecks.link(this); |
129 |
m_exceptionChecks.link(this); |
| 130 |
|
130 |
|
| 131 |
// lookupExceptionHandler is passed one argument, the exec (the CallFrame*). |
131 |
// lookupExceptionHandler is passed two arguments, the VM and the exec (the CallFrame*). |
| 132 |
move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR0); |
132 |
move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR1); |
| 133 |
|
133 |
|
| 134 |
if (doLookup.isSet()) |
134 |
if (doLookup.isSet()) |
| 135 |
doLookup.link(this); |
135 |
doLookup.link(this); |
| 136 |
|
136 |
|
|
|
137 |
move(TrustedImmPtr(vm()), GPRInfo::argumentGPR0); |
| 138 |
|
| 137 |
#if CPU(X86) |
139 |
#if CPU(X86) |
| 138 |
// FIXME: should use the call abstraction, but this is currently in the SpeculativeJIT layer! |
140 |
// FIXME: should use the call abstraction, but this is currently in the SpeculativeJIT layer! |
| 139 |
poke(GPRInfo::argumentGPR0); |
141 |
poke(GPRInfo::argumentGPR0); |
|
|
142 |
poke(GPRInfo::argumentGPR1, 1); |
| 140 |
#endif |
143 |
#endif |
| 141 |
m_calls.append(CallLinkRecord(call(), lookupExceptionHandler)); |
144 |
m_calls.append(CallLinkRecord(call(), lookupExceptionHandler)); |
| 142 |
jumpToExceptionHandler(); |
145 |
jumpToExceptionHandler(); |