Changeset 94629 in webkit for trunk/Source/JavaScriptCore/dfg/DFGJITCompiler.h
- Timestamp:
- Sep 6, 2011, 7:47:51 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/dfg/DFGJITCompiler.h
r94559 r94629 55 55 struct SpeculationCheck; 56 56 57 #ifndef NDEBUG 58 typedef void (*V_DFGDebugOperation_EP)(ExecState*, void*); 59 #endif 60 61 #if DFG_VERBOSE_SPECULATION_FAILURE 62 struct SpeculationFailureDebugInfo { 63 CodeBlock* codeBlock; 64 unsigned debugOffset; 65 }; 66 #endif 67 57 68 // === CallRecord === 58 69 // … … 206 217 return functionCall; 207 218 } 219 220 #ifndef NDEBUG 221 // Add a debug call. This call has no effect on JIT code execution state. 222 void debugCall(V_DFGDebugOperation_EP function, void* argument) 223 { 224 for (unsigned i = 0; i < GPRInfo::numberOfRegisters; ++i) 225 storePtr(GPRInfo::toRegister(i), m_globalData->debugDataBuffer + i); 226 for (unsigned i = 0; i < FPRInfo::numberOfRegisters; ++i) { 227 move(TrustedImmPtr(m_globalData->debugDataBuffer + GPRInfo::numberOfRegisters + i), GPRInfo::regT0); 228 storeDouble(FPRInfo::toRegister(i), GPRInfo::regT0); 229 } 230 move(TrustedImmPtr(argument), GPRInfo::argumentGPR1); 231 move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR0); 232 move(TrustedImmPtr(reinterpret_cast<void*>(function)), GPRInfo::regT0); 233 call(GPRInfo::regT0); 234 for (unsigned i = 0; i < FPRInfo::numberOfRegisters; ++i) { 235 move(TrustedImmPtr(m_globalData->debugDataBuffer + GPRInfo::numberOfRegisters + i), GPRInfo::regT0); 236 loadDouble(GPRInfo::regT0, FPRInfo::toRegister(i)); 237 } 238 for (unsigned i = 0; i < GPRInfo::numberOfRegisters; ++i) 239 loadPtr(m_globalData->debugDataBuffer + i, GPRInfo::toRegister(i)); 240 } 241 #endif 208 242 209 243 // Helper methods to check nodes for constants. … … 212 246 bool isInt32Constant(NodeIndex nodeIndex) { return graph().isInt32Constant(codeBlock(), nodeIndex); } 213 247 bool isDoubleConstant(NodeIndex nodeIndex) { return graph().isDoubleConstant(codeBlock(), nodeIndex); } 248 bool isBooleanConstant(NodeIndex nodeIndex) { return graph().isBooleanConstant(codeBlock(), nodeIndex); } 214 249 // Helper methods get constant values from nodes. 215 250 JSValue valueOfJSConstant(NodeIndex nodeIndex) { return graph().valueOfJSConstant(codeBlock(), nodeIndex); } 216 251 int32_t valueOfInt32Constant(NodeIndex nodeIndex) { return graph().valueOfInt32Constant(codeBlock(), nodeIndex); } 217 252 double valueOfDoubleConstant(NodeIndex nodeIndex) { return graph().valueOfDoubleConstant(codeBlock(), nodeIndex); } 253 bool valueOfBooleanConstant(NodeIndex nodeIndex) { return graph().valueOfBooleanConstant(codeBlock(), nodeIndex); } 218 254 219 255 // These methods JIT generate dynamic, debug-only checks - akin to ASSERTs.
Note:
See TracChangeset
for help on using the changeset viewer.