Ignore:
Timestamp:
Feb 20, 2006, 11:54:55 PM (19 years ago)
Author:
mjs
Message:

Reviewed by Geoff and Darin.


Patch from Maks Orlovich, based on work by David Faure, hand-applied and
significantly reworked by me.


  • tests/mozilla/expected.html: Updated for newly fixed test.
  • kjs/array_object.cpp: (ArrayProtoFunc::ArrayProtoFunc):
  • kjs/array_object.h:
  • kjs/bool_object.cpp: (BooleanPrototype::BooleanPrototype): (BooleanProtoFunc::BooleanProtoFunc):
  • kjs/bool_object.h:
  • kjs/date_object.cpp: (KJS::DateProtoFunc::DateProtoFunc): (KJS::DateObjectImp::DateObjectImp): (KJS::DateObjectFuncImp::DateObjectFuncImp):
  • kjs/error_object.cpp: (ErrorPrototype::ErrorPrototype): (ErrorProtoFunc::ErrorProtoFunc):
  • kjs/error_object.h:
  • kjs/function.cpp: (KJS::FunctionImp::FunctionImp): (KJS::GlobalFuncImp::GlobalFuncImp):
  • kjs/function.h:
  • kjs/function_object.cpp: (FunctionPrototype::FunctionPrototype): (FunctionProtoFunc::FunctionProtoFunc): (FunctionProtoFunc::callAsFunction):
  • kjs/function_object.h:
  • kjs/internal.cpp: (KJS::InterpreterImp::initGlobalObject): (KJS::InternalFunctionImp::InternalFunctionImp):
  • kjs/internal.h: (KJS::InternalFunctionImp::functionName):
  • kjs/lookup.h: (KJS::staticFunctionGetter): (KJS::HashEntryFunction::HashEntryFunction): (KJS::HashEntryFunction::implementsCall): (KJS::HashEntryFunction::toBoolean): (KJS::HashEntryFunction::implementsHasInstance): (KJS::HashEntryFunction::hasInstance):
  • kjs/math_object.cpp: (MathFuncImp::MathFuncImp):
  • kjs/math_object.h:
  • kjs/number_object.cpp: (NumberPrototype::NumberPrototype): (NumberProtoFunc::NumberProtoFunc):
  • kjs/number_object.h:
  • kjs/object.cpp: (KJS::JSObject::putDirectFunction): (KJS::Error::create):
  • kjs/object.h:
  • kjs/object_object.cpp: (ObjectPrototype::ObjectPrototype): (ObjectProtoFunc::ObjectProtoFunc):
  • kjs/object_object.h:
  • kjs/regexp_object.cpp: (RegExpPrototype::RegExpPrototype): (RegExpProtoFunc::RegExpProtoFunc):
  • kjs/regexp_object.h:
  • kjs/string_object.cpp: (StringProtoFunc::StringProtoFunc): (StringObjectImp::StringObjectImp): (StringObjectFuncImp::StringObjectFuncImp):
  • kjs/string_object.h:
File:
1 edited

Legend:

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

    r12624 r12911  
    8484class DateProtoFunc : public InternalFunctionImp {
    8585public:
    86     DateProtoFunc(ExecState *, int i, int len);
     86    DateProtoFunc(ExecState *, int i, int len, const Identifier& date);
    8787
    8888    virtual bool implementsCall() const;
     
    111111class DateObjectFuncImp : public InternalFunctionImp {
    112112public:
    113     DateObjectFuncImp(ExecState *, FunctionPrototype *, int i, int len);
     113    DateObjectFuncImp(ExecState *, FunctionPrototype *, int i, int len, const Identifier& );
    114114
    115115    virtual bool implementsCall() const;
     
    540540// ------------------------------ DateProtoFunc -----------------------------
    541541
    542 DateProtoFunc::DateProtoFunc(ExecState *exec, int i, int len)
    543   : InternalFunctionImp(static_cast<FunctionPrototype*>(exec->lexicalInterpreter()->builtinFunctionPrototype())),
    544     id(abs(i)), utc(i<0)
     542DateProtoFunc::DateProtoFunc(ExecState *exec, int i, int len, const Identifier& name)
     543  : InternalFunctionImp(static_cast<FunctionPrototype*>(exec->lexicalInterpreter()->builtinFunctionPrototype()), name)
     544  , id(abs(i))
     545  , utc(i < 0)
    545546  // We use a negative ID to denote the "UTC" variant.
    546547{
     
    720721
    721722  static const Identifier parsePropertyName("parse");
    722   putDirect(parsePropertyName, new DateObjectFuncImp(exec,funcProto,DateObjectFuncImp::Parse, 1), DontEnum);
     723  putDirectFunction(new DateObjectFuncImp(exec, funcProto, DateObjectFuncImp::Parse, 1, parsePropertyName), DontEnum);
    723724  static const Identifier UTCPropertyName("UTC");
    724   putDirect(UTCPropertyName,   new DateObjectFuncImp(exec,funcProto,DateObjectFuncImp::UTC,   7),  DontEnum);
     725  putDirectFunction(new DateObjectFuncImp(exec, funcProto, DateObjectFuncImp::UTC, 7, UTCPropertyName), DontEnum);
    725726
    726727  // no. of arguments for constructor
     
    811812// ------------------------------ DateObjectFuncImp ----------------------------
    812813
    813 DateObjectFuncImp::DateObjectFuncImp(ExecState *exec, FunctionPrototype *funcProto, int i, int len)
    814     : InternalFunctionImp(funcProto), id(i)
     814DateObjectFuncImp::DateObjectFuncImp(ExecState *exec, FunctionPrototype *funcProto, int i, int len, const Identifier& name)
     815    : InternalFunctionImp(funcProto, name), id(i)
    815816{
    816817    putDirect(lengthPropertyName, len, DontDelete|ReadOnly|DontEnum);
Note: See TracChangeset for help on using the changeset viewer.