Changeset 34086 in webkit for trunk/JavaScriptCore/VM/Machine.cpp


Ignore:
Timestamp:
May 23, 2008, 12:12:31 PM (17 years ago)
Author:
[email protected]
Message:

2008-05-23 Geoffrey Garen <[email protected]>

Rolled out r34085 because it measured as a 7.6% performance regression.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/VM/Machine.cpp

    r34085 r34086  
    438438}
    439439
    440 static NEVER_INLINE JSValue* callEval(ExecState* exec, JSObject* thisObj, JSObject* evalFunction, ScopeChainNode* scopeChain, RegisterFile* registerFile, Register* r, int argv, int argc, JSValue*& exceptionValue)
     440static NEVER_INLINE JSValue* callEval(ExecState* exec, JSObject* thisObj, ScopeChainNode* scopeChain, RegisterFile* registerFile, Register* r, int argv, int argc, JSValue*& exceptionValue)
    441441{
    442442    Profiler** profiler = Profiler::enabledProfilerReference();
     443    JSObject* evalFunction = scopeChain->globalObject()->evalFunction();
    443444    if (*profiler)
    444445        (*profiler)->willExecute(exec, evalFunction);
     
    576577    }
    577578
    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 
    587579    if (oldCodeBlock->needsFullScopeChain)
    588580        scopeChain->deref();
     
    591583        return false;
    592584
     585    Register* callFrame = r - oldCodeBlock->numLocals - CallFrameHeaderSize;
     586   
    593587    codeBlock = callFrame[CallerCodeBlock].u.codeBlock;
    594588    if (!codeBlock)
     
    608602    vPC = callFrame[ReturnVPC].u.vPC;
    609603
     604    if (Profiler* profiler = *Profiler::enabledProfilerReference())
     605        profiler->didExecute(exec, callFrame[Callee].u.jsObject);
    610606    return true;
    611607}
     
    673669        scopeChain = scopeChain->copy();
    674670
    675     ExecState newExec(exec, this, registerFile, scopeChain, -1);
    676 
    677671    Profiler** profiler = Profiler::enabledProfilerReference();
    678672    if (*profiler)
    679673        (*profiler)->willExecute(exec, programNode->sourceURL(), programNode->lineNo());
     674
     675    ExecState newExec(exec, this, registerFile, scopeChain, -1);
    680676
    681677    m_reentryDepth++;
     
    743739    JSValue* result = privateExecute(Normal, &newExec, registerFile, r, scopeChain, newCodeBlock, exception);
    744740    m_reentryDepth--;
     741
     742    if (*profiler)
     743        (*profiler)->didExecute(exec, function);
    745744
    746745    registerFile->shrink(oldSize);
     
    18661865            registerFile->setSafeForReentry(true);
    18671866
    1868             JSValue* result = callEval(exec, thisObject, static_cast<JSObject*>(funcVal), scopeChain, registerFile, r, argv, argc, exceptionValue);
     1867            JSValue* result = callEval(exec, thisObject, scopeChain, registerFile, r, argv, argc, exceptionValue);
    18691868
    18701869            registerFile->setSafeForReentry(false);
     
    19761975            activation->copyRegisters();
    19771976        }
    1978 
    1979         if (*enabledProfilerReference)
    1980             (*enabledProfilerReference)->didExecute(exec, callFrame[Callee].u.jsObject);
    19811977
    19821978        if (codeBlock->needsFullScopeChain)
     
    20001996        int r0 = callFrame[ReturnValueRegister].u.i;
    20011997        r[r0].u.jsValue = returnValue;
     1998
     1999        if (*enabledProfilerReference)
     2000            (*enabledProfilerReference)->didExecute(exec, callFrame[Callee].u.jsObject);
    20022001
    20032002        NEXT_OPCODE;
Note: See TracChangeset for help on using the changeset viewer.