Changeset 26808 in webkit for trunk/JavaScriptCore/kjs/nodes.h


Ignore:
Timestamp:
Oct 19, 2007, 10:18:23 PM (18 years ago)
Author:
ggaren
Message:

Reviewed by Darin Adler.


To improve encapsulation, moved processDeclarations call into
FunctionBodyNode::execute. Also marked processDeclarations
ALWAYS_INLINE, since it has only 1 caller now. This is a .71% speedup
on command-line JS iBench.

  • kjs/function.cpp: (KJS::FunctionImp::callAsFunction): (KJS::GlobalFuncImp::callAsFunction):
  • kjs/function.h:
  • kjs/interpreter.cpp: (KJS::Interpreter::evaluate):
  • kjs/nodes.cpp: (FunctionBodyNode::execute):
  • kjs/nodes.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/nodes.h

    r26689 r26808  
    815815    JSValue* evaluate(ExecState*) KJS_FAST_CALL;
    816816    virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
    817     void ALWAYS_INLINE processDeclaration(ExecState*) KJS_FAST_CALL;
     817    ALWAYS_INLINE void processDeclaration(ExecState*) KJS_FAST_CALL;
    818818    virtual void getDeclarations(DeclarationStacks&) KJS_FAST_CALL;
    819819  private:
     
    10441044    int sourceId() KJS_FAST_CALL { return m_sourceId; }
    10451045    const UString& sourceURL() KJS_FAST_CALL { return m_sourceURL; }
     1046
     1047    virtual Completion execute(ExecState*) KJS_FAST_CALL;
    10461048
    10471049    void addParam(const Identifier& ident) KJS_FAST_CALL;
     
    10501052    UString paramString() const KJS_FAST_CALL;
    10511053    Vector<Identifier>& parameters() KJS_FAST_CALL { return m_parameters; }
    1052     void processDeclarations(ExecState*) KJS_FAST_CALL;
     1054    ALWAYS_INLINE void processDeclarations(ExecState*) KJS_FAST_CALL;
    10531055  private:
    10541056    UString m_sourceURL;
     
    10811083    virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
    10821084    virtual void getDeclarations(DeclarationStacks&) KJS_FAST_CALL;
    1083     void ALWAYS_INLINE processDeclaration(ExecState*) KJS_FAST_CALL;
     1085    ALWAYS_INLINE void processDeclaration(ExecState*) KJS_FAST_CALL;
    10841086  private:
    10851087    void addParams() KJS_FAST_CALL;
Note: See TracChangeset for help on using the changeset viewer.