Changeset 21032 in webkit for trunk/JavaScriptCore/kjs/function.h


Ignore:
Timestamp:
Apr 23, 2007, 3:28:10 AM (18 years ago)
Author:
mjs
Message:

Reviewed by Darin.


  • shrink FunctionImp / DeclaredFunctionImp by 4 bytes, by moving parameter list to function body


I reconciled this with a similar change in KDE kjs by Maks Orlovich <[email protected]>.

  • kjs/function.cpp: (KJS::FunctionImp::callAsFunction): (KJS::FunctionImp::passInParameters): (KJS::FunctionImp::lengthGetter): (KJS::FunctionImp::getParameterName):
  • kjs/function.h:
  • kjs/function_object.cpp: (FunctionProtoFunc::callAsFunction): (FunctionObjectImp::construct):
  • kjs/nodes.cpp: (FunctionBodyNode::addParam): (FunctionBodyNode::paramString): (FuncDeclNode::addParams): (FuncDeclNode::processFuncDecl): (FuncExprNode::addParams): (FuncExprNode::evaluate):
  • kjs/nodes.h: (KJS::Parameter::Parameter): (KJS::FunctionBodyNode::numParams): (KJS::FunctionBodyNode::paramName): (KJS::FunctionBodyNode::parameters): (KJS::FuncExprNode::FuncExprNode): (KJS::FuncDeclNode::FuncDeclNode):
  • JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Disable 64-bit warnings because they handle size_t badly.
File:
1 edited

Legend:

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

    r21019 r21032  
    3333  class ActivationImp;
    3434  class FunctionBodyNode;
    35   class Parameter;
    3635
    3736  /**
     
    5049    virtual JSValue* callAsFunction(ExecState*, JSObject* thisObj, const List& args);
    5150
    52     void addParameter(const Identifier& n);
     51    // Note: unlike body->paramName, this returns Identifier::null for parameters
     52    // that will never get set, due to later param having the same name
    5353    Identifier getParameterName(int index);
    54     // parameters in string representation, e.g. (a, b, c)
    55     UString parameterString() const;
    5654    virtual CodeType codeType() const = 0;
    5755
     
    9391
    9492    virtual void mark();
    95   protected:
    96     OwnPtr<Vector<Parameter> > parameters;
    9793
    9894  private:
     
    10399    static JSValue* lengthGetter(ExecState*, JSObject*, const Identifier&, const PropertySlot&);
    104100
    105     void processParameters(ExecState*, const List&);
     101    void passInParameters(ExecState*, const List&);
    106102    virtual void processVarDecls(ExecState*);
    107103  };
Note: See TracChangeset for help on using the changeset viewer.