Changeset 155081 in webkit for trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp
- Timestamp:
- Sep 4, 2013, 5:40:15 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp
r155075 r155081 64 64 #include "Register.h" 65 65 #include "SamplingTool.h" 66 #include "Stack Iterator.h"66 #include "StackVisitor.h" 67 67 #include "StrictEvalActivation.h" 68 68 #include "StrongInlines.h" … … 283 283 } 284 284 285 Stack Iterator::Status operator()(StackIterator& iter)285 StackVisitor::Status operator()(StackVisitor& visitor) 286 286 { 287 287 if (!m_hasSkippedFirstFrame) { 288 288 m_hasSkippedFirstFrame = true; 289 return Stack Iterator::Continue;289 return StackVisitor::Continue; 290 290 } 291 291 292 292 unsigned line = 0; 293 293 unsigned unusedColumn = 0; 294 iter->computeLineAndColumn(line, unusedColumn);295 dataLogF("[ReturnVPC] | %10p | %d (line %d)\n", m_it, iter->bytecodeOffset(), line);294 visitor->computeLineAndColumn(line, unusedColumn); 295 dataLogF("[ReturnVPC] | %10p | %d (line %d)\n", m_it, visitor->bytecodeOffset(), line); 296 296 ++m_it; 297 return Stack Iterator::Done;297 return StackVisitor::Done; 298 298 } 299 299 … … 390 390 } 391 391 392 static bool unwindCallFrame(Stack Iterator& iter, JSValue exceptionValue)393 { 394 CallFrame* callFrame = iter->callFrame();395 CodeBlock* codeBlock = iter->codeBlock();392 static bool unwindCallFrame(StackVisitor& visitor, JSValue exceptionValue) 393 { 394 CallFrame* callFrame = visitor->callFrame(); 395 CodeBlock* codeBlock = visitor->codeBlock(); 396 396 CodeBlock* oldCodeBlock = codeBlock; 397 397 JSScope* scope = callFrame->scope(); … … 432 432 } 433 433 434 static StackFrameCodeType getStackFrameCodeType(Stack Iterator iter)435 { 436 switch ( iter->codeType()) {437 case Stack Iterator::Frame::Eval:434 static StackFrameCodeType getStackFrameCodeType(StackVisitor& visitor) 435 { 436 switch (visitor->codeType()) { 437 case StackVisitor::Frame::Eval: 438 438 return StackFrameEvalCode; 439 case Stack Iterator::Frame::Function:439 case StackVisitor::Frame::Function: 440 440 return StackFrameFunctionCode; 441 case Stack Iterator::Frame::Global:441 case StackVisitor::Frame::Global: 442 442 return StackFrameGlobalCode; 443 case Stack Iterator::Frame::Native:443 case StackVisitor::Frame::Native: 444 444 ASSERT_NOT_REACHED(); 445 445 return StackFrameNativeCode; … … 507 507 } 508 508 509 Stack Iterator::Status operator()(StackIterator& iter)509 StackVisitor::Status operator()(StackVisitor& visitor) 510 510 { 511 511 VM& vm = m_vm; 512 512 if (m_remainingCapacityForFrameCapture) { 513 if ( iter->isJSFrame()) {514 CodeBlock* codeBlock = iter->codeBlock();513 if (visitor->isJSFrame()) { 514 CodeBlock* codeBlock = visitor->codeBlock(); 515 515 StackFrame s = { 516 Strong<JSObject>(vm, iter->callee()),517 getStackFrameCodeType( iter),516 Strong<JSObject>(vm, visitor->callee()), 517 getStackFrameCodeType(visitor), 518 518 Strong<ExecutableBase>(vm, codeBlock->ownerExecutable()), 519 519 Strong<UnlinkedCodeBlock>(vm, codeBlock->unlinkedCodeBlock()), … … 522 522 codeBlock->firstLineColumnOffset(), 523 523 codeBlock->sourceOffset(), 524 iter->bytecodeOffset(),525 iter->sourceURL()524 visitor->bytecodeOffset(), 525 visitor->sourceURL() 526 526 }; 527 527 m_results.append(s); 528 528 } else { 529 StackFrame s = { Strong<JSObject>(vm, iter->callee()), StackFrameNativeCode, Strong<ExecutableBase>(), Strong<UnlinkedCodeBlock>(), 0, 0, 0, 0, 0, String()};529 StackFrame s = { Strong<JSObject>(vm, visitor->callee()), StackFrameNativeCode, Strong<ExecutableBase>(), Strong<UnlinkedCodeBlock>(), 0, 0, 0, 0, 0, String()}; 530 530 m_results.append(s); 531 531 } 532 532 533 533 m_remainingCapacityForFrameCapture--; 534 return Stack Iterator::Continue;535 } 536 return Stack Iterator::Done;534 return StackVisitor::Continue; 535 } 536 return StackVisitor::Done; 537 537 } 538 538 … … 578 578 } 579 579 580 Stack Iterator::Status operator()(StackIterator& iter)580 StackVisitor::Status operator()(StackVisitor& visitor) 581 581 { 582 582 VM& vm = m_callFrame->vm(); 583 m_callFrame = iter->callFrame();584 m_codeBlock = iter->codeBlock();585 unsigned bytecodeOffset = iter->bytecodeOffset();583 m_callFrame = visitor->callFrame(); 584 m_codeBlock = visitor->codeBlock(); 585 unsigned bytecodeOffset = visitor->bytecodeOffset(); 586 586 587 587 if (m_isTermination || !(m_handler = m_codeBlock->handlerForBytecodeOffset(bytecodeOffset))) { 588 if (!unwindCallFrame( iter, m_exceptionValue)) {588 if (!unwindCallFrame(visitor, m_exceptionValue)) { 589 589 if (LegacyProfiler* profiler = vm.enabledProfiler()) 590 590 profiler->exceptionUnwind(m_callFrame); 591 return Stack Iterator::Done;591 return StackVisitor::Done; 592 592 } 593 593 } else 594 return Stack Iterator::Done;595 596 return Stack Iterator::Continue;594 return StackVisitor::Done; 595 596 return StackVisitor::Continue; 597 597 } 598 598
Note:
See TracChangeset
for help on using the changeset viewer.