Changeset 34086 in webkit for trunk/JavaScriptCore/VM/Machine.cpp
- Timestamp:
- May 23, 2008, 12:12:31 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/VM/Machine.cpp
r34085 r34086 438 438 } 439 439 440 static NEVER_INLINE JSValue* callEval(ExecState* exec, JSObject* thisObj, JSObject* evalFunction,ScopeChainNode* scopeChain, RegisterFile* registerFile, Register* r, int argv, int argc, JSValue*& exceptionValue)440 static NEVER_INLINE JSValue* callEval(ExecState* exec, JSObject* thisObj, ScopeChainNode* scopeChain, RegisterFile* registerFile, Register* r, int argv, int argc, JSValue*& exceptionValue) 441 441 { 442 442 Profiler** profiler = Profiler::enabledProfilerReference(); 443 JSObject* evalFunction = scopeChain->globalObject()->evalFunction(); 443 444 if (*profiler) 444 445 (*profiler)->willExecute(exec, evalFunction); … … 576 577 } 577 578 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 code582 profiler->didExecute(exec, callFrame[Callee].u.jsObject);583 else584 profiler->didExecute(exec, codeBlock->ownerNode->sourceURL(), codeBlock->ownerNode->lineNo());585 }586 587 579 if (oldCodeBlock->needsFullScopeChain) 588 580 scopeChain->deref(); … … 591 583 return false; 592 584 585 Register* callFrame = r - oldCodeBlock->numLocals - CallFrameHeaderSize; 586 593 587 codeBlock = callFrame[CallerCodeBlock].u.codeBlock; 594 588 if (!codeBlock) … … 608 602 vPC = callFrame[ReturnVPC].u.vPC; 609 603 604 if (Profiler* profiler = *Profiler::enabledProfilerReference()) 605 profiler->didExecute(exec, callFrame[Callee].u.jsObject); 610 606 return true; 611 607 } … … 673 669 scopeChain = scopeChain->copy(); 674 670 675 ExecState newExec(exec, this, registerFile, scopeChain, -1);676 677 671 Profiler** profiler = Profiler::enabledProfilerReference(); 678 672 if (*profiler) 679 673 (*profiler)->willExecute(exec, programNode->sourceURL(), programNode->lineNo()); 674 675 ExecState newExec(exec, this, registerFile, scopeChain, -1); 680 676 681 677 m_reentryDepth++; … … 743 739 JSValue* result = privateExecute(Normal, &newExec, registerFile, r, scopeChain, newCodeBlock, exception); 744 740 m_reentryDepth--; 741 742 if (*profiler) 743 (*profiler)->didExecute(exec, function); 745 744 746 745 registerFile->shrink(oldSize); … … 1866 1865 registerFile->setSafeForReentry(true); 1867 1866 1868 JSValue* result = callEval(exec, thisObject, s tatic_cast<JSObject*>(funcVal), scopeChain, registerFile, r, argv, argc, exceptionValue);1867 JSValue* result = callEval(exec, thisObject, scopeChain, registerFile, r, argv, argc, exceptionValue); 1869 1868 1870 1869 registerFile->setSafeForReentry(false); … … 1976 1975 activation->copyRegisters(); 1977 1976 } 1978 1979 if (*enabledProfilerReference)1980 (*enabledProfilerReference)->didExecute(exec, callFrame[Callee].u.jsObject);1981 1977 1982 1978 if (codeBlock->needsFullScopeChain) … … 2000 1996 int r0 = callFrame[ReturnValueRegister].u.i; 2001 1997 r[r0].u.jsValue = returnValue; 1998 1999 if (*enabledProfilerReference) 2000 (*enabledProfilerReference)->didExecute(exec, callFrame[Callee].u.jsObject); 2002 2001 2003 2002 NEXT_OPCODE;
Note:
See TracChangeset
for help on using the changeset viewer.