Ignore:
Timestamp:
Oct 17, 2007, 2:01:27 PM (18 years ago)
Author:
ggaren
Message:

Reviewed by Darin Adler.


Merged DeclaredFunctionImp into FunctionImp (the base class) because
the distinction between the two was unused.


Removed codeType() from FunctionImp because FunctionImp and its
subclasses all returned FunctionCode, so it was unused, practically
speaking.


Removed a different codeType() from GlobalFuncImp because it was unused.
(Perhaps it was vestigial from a time when GlobalFuncImp used to
inherit from FunctionImp.)

  • bindings/runtime_method.cpp:
  • bindings/runtime_method.h:
  • kjs/function.cpp: (KJS::): (KJS::FunctionImp::FunctionImp): (KJS::FunctionImp::callAsFunction): (KJS::FunctionImp::construct): (KJS::FunctionImp::execute): (KJS::FunctionImp::processVarDecls):
  • kjs/function.h: (KJS::FunctionImp::implementsConstruct): (KJS::FunctionImp::scope):
  • kjs/function_object.cpp: (FunctionProtoFunc::callAsFunction): (FunctionObjectImp::construct):
  • kjs/nodes.cpp: (FuncDeclNode::processFuncDecl): (FuncExprNode::evaluate):
File:
1 edited

Legend:

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

    r26688 r26715  
    8181      return throwError(exec, TypeError);
    8282    }
    83     if (thisObj->inherits(&DeclaredFunctionImp::info)) {
    84         DeclaredFunctionImp *fi = static_cast<DeclaredFunctionImp*>(thisObj);
     83    if (thisObj->inherits(&FunctionImp::info)) {
     84        FunctionImp *fi = static_cast<FunctionImp*>(thisObj);
    8585        return jsString("function " + fi->functionName().ustring() + "(" +
    8686                        fi->body->paramString() + ") " + fi->body->toString());
     
    209209  FunctionBodyNode *bodyNode = progNode.get();
    210210
    211   FunctionImp* fimp = new DeclaredFunctionImp(exec, functionName, bodyNode, scopeChain);
     211  FunctionImp* fimp = new FunctionImp(exec, functionName, bodyNode, scopeChain);
    212212 
    213213  // parse parameter list. throw syntax error on illegal identifiers
Note: See TracChangeset for help on using the changeset viewer.