Changeset 34090 in webkit for trunk/JavaScriptCore/VM/Machine.cpp
- Timestamp:
- May 23, 2008, 2:28:31 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/VM/Machine.cpp
r34086 r34090 441 441 { 442 442 Profiler** profiler = Profiler::enabledProfilerReference(); 443 JSObject* evalFunction = scopeChain->globalObject()->evalFunction();444 443 if (*profiler) 445 (*profiler)->willExecute(exec, evalFunction);444 (*profiler)->willExecute(exec, scopeChain->globalObject()->evalFunction()); 446 445 447 446 JSValue* x = argc >= 2 ? r[argv + 1].u.jsValue : jsUndefined(); … … 470 469 471 470 if ((*profiler)) 472 (*profiler)->didExecute(exec, evalFunction);471 (*profiler)->didExecute(exec, scopeChain->globalObject()->evalFunction()); 473 472 474 473 return result; … … 577 576 } 578 577 578 Register* callFrame = r - oldCodeBlock->numLocals - CallFrameHeaderSize; 579 580 if (Profiler* profiler = *Profiler::enabledProfilerReference()) { 581 if (!isGlobalCallFrame(registerBase, r) && callFrame[Callee].u.jsObject) // Check for global and eval code 582 profiler->didExecute(exec, callFrame[Callee].u.jsObject); 583 else 584 profiler->didExecute(exec, codeBlock->ownerNode->sourceURL(), codeBlock->ownerNode->lineNo()); 585 } 586 579 587 if (oldCodeBlock->needsFullScopeChain) 580 588 scopeChain->deref(); … … 583 591 return false; 584 592 585 Register* callFrame = r - oldCodeBlock->numLocals - CallFrameHeaderSize;586 587 593 codeBlock = callFrame[CallerCodeBlock].u.codeBlock; 588 594 if (!codeBlock) … … 602 608 vPC = callFrame[ReturnVPC].u.vPC; 603 609 604 if (Profiler* profiler = *Profiler::enabledProfilerReference())605 profiler->didExecute(exec, callFrame[Callee].u.jsObject);606 610 return true; 607 611 } … … 669 673 scopeChain = scopeChain->copy(); 670 674 675 ExecState newExec(exec, this, registerFile, scopeChain, -1); 676 671 677 Profiler** profiler = Profiler::enabledProfilerReference(); 672 678 if (*profiler) 673 679 (*profiler)->willExecute(exec, programNode->sourceURL(), programNode->lineNo()); 674 675 ExecState newExec(exec, this, registerFile, scopeChain, -1);676 680 677 681 m_reentryDepth++; … … 739 743 JSValue* result = privateExecute(Normal, &newExec, registerFile, r, scopeChain, newCodeBlock, exception); 740 744 m_reentryDepth--; 741 742 if (*profiler)743 (*profiler)->didExecute(exec, function);744 745 745 746 registerFile->shrink(oldSize); … … 1976 1977 } 1977 1978 1979 if (*enabledProfilerReference) 1980 (*enabledProfilerReference)->didExecute(exec, callFrame[Callee].u.jsObject); 1981 1978 1982 if (codeBlock->needsFullScopeChain) 1979 1983 scopeChain->deref(); … … 1996 2000 int r0 = callFrame[ReturnValueRegister].u.i; 1997 2001 r[r0].u.jsValue = returnValue; 1998 1999 if (*enabledProfilerReference)2000 (*enabledProfilerReference)->didExecute(exec, callFrame[Callee].u.jsObject);2001 2002 2002 2003 NEXT_OPCODE;
Note:
See TracChangeset
for help on using the changeset viewer.