Changeset 59791 in webkit for trunk/JavaScriptCore/interpreter/Interpreter.cpp
- Timestamp:
- May 19, 2010, 4:24:31 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/interpreter/Interpreter.cpp
r59781 r59791 71 71 72 72 namespace JSC { 73 74 static ALWAYS_INLINE unsigned bytecodeOffsetForPC(CallFrame* callFrame, CodeBlock* codeBlock, void* pc)75 {76 #if ENABLE(JIT)77 return codeBlock->bytecodeOffset(callFrame, ReturnAddressPtr(pc));78 #else79 UNUSED_PARAM(callFrame);80 return static_cast<Instruction*>(pc) - codeBlock->instructions().begin();81 #endif82 }83 73 84 74 // Returns the depth of the scope chain within a given call frame. … … 552 542 scopeChain->deref(); 553 543 554 void* returnPC = callFrame->returnPC(); 555 callFrame = callFrame->callerFrame(); 556 if (callFrame->hasHostCallFrameFlag()) 544 CallFrame* callerFrame = callFrame->callerFrame(); 545 if (callerFrame->hasHostCallFrameFlag()) 557 546 return false; 558 547 559 codeBlock = callFrame->codeBlock(); 560 bytecodeOffset = bytecodeOffsetForPC(callFrame, codeBlock, returnPC); 548 codeBlock = callerFrame->codeBlock(); 549 bytecodeOffset = codeBlock->bytecodeOffset(callerFrame, callFrame->returnPC()); 550 callFrame = callerFrame; 561 551 return true; 562 552 } … … 4466 4456 return; 4467 4457 4468 unsigned bytecodeOffset = bytecodeOffsetForPC(callerFrame, callerCodeBlock, callFrame->returnPC());4458 unsigned bytecodeOffset = callerCodeBlock->bytecodeOffset(callerFrame, callFrame->returnPC()); 4469 4459 lineNumber = callerCodeBlock->lineNumberForBytecodeOffset(callerFrame, bytecodeOffset - 1); 4470 4460 sourceID = callerCodeBlock->ownerExecutable()->sourceID();
Note:
See TracChangeset
for help on using the changeset viewer.