Ignore:
Timestamp:
Dec 10, 2007, 9:47:41 PM (17 years ago)
Author:
[email protected]
Message:

JavaScriptCore:

Reviewed by Sam Weinig.

Split this:


FunctionBodyNode


|

ProgramNode


into this:


ScopeNode


| | |

FunctionBodyNode ProgramNode EvalNode

in preparation for specializing each class more while optimizing global
variable access.


Also removed some cruft from the FunctionBodyNode interface to simplify
things.


SunSpider says this patch is a .8% speedup, which seems reasonable,
since it eliminates a few branches and adds KJS_FAST_CALL in a few
places.


Layout tests and JS tests pass. Also, this baby builds on Windows! (Qt
mileage may vary...)

WebCore:

Reviewed by Sam Weinig.

Updated for rename in JavaScriptCore.

  • bridge/mac/WebCoreScriptDebugger.mm: (-[WebCoreScriptCallFrame scopeChain]): (-[WebCoreScriptCallFrame functionName]): (-[WebCoreScriptCallFrame evaluateWebScript:]):

WebKit/win:

Reviewed by Sam Weinig.

Updated for rename in JavaScriptCore.

  • WebScriptCallFrame.cpp: (WebScriptCallFrame::functionName): (WebScriptCallFrame::valueByEvaluatingJavaScriptFromString):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/function.cpp

    r28595 r28608  
    131131{
    132132    FunctionImp* thisObj = static_cast<FunctionImp*>(slot.slotBase());
    133     return jsNumber(thisObj->body->numParams());
     133    return jsNumber(thisObj->body->parameters().size());
    134134}
    135135
     
    181181    Vector<Identifier>& parameters = body->parameters();
    182182
    183     if (static_cast<size_t>(index) >= body->numParams())
     183    if (static_cast<size_t>(index) >= body->parameters().size())
    184184        return CommonIdentifiers::shared()->nullIdentifier;
    185185 
     
    700700        int errLine;
    701701        UString errMsg;
    702         RefPtr<ProgramNode> progNode(parser().parse<ProgramNode>(UString(), 0, s.data(), s.size(), &sourceId, &errLine, &errMsg));
     702        RefPtr<EvalNode> progNode(parser().parse<EvalNode>(UString(), 0, s.data(), s.size(), &sourceId, &errLine, &errMsg));
    703703
    704704        Debugger* dbg = exec->dynamicGlobalObject()->debugger();
Note: See TracChangeset for help on using the changeset viewer.