Ignore:
Timestamp:
Jun 15, 2008, 8:02:57 PM (17 years ago)
Author:
Darin Adler
Message:

JavaScriptCore:

2008-06-15 Darin Adler <Darin Adler>

Rubber stamped by Sam.

  • cut down on confusing uses of "Object" and "Imp" in JavaScriptCore class names
  • API/JSCallbackFunction.cpp: (KJS::JSCallbackFunction::JSCallbackFunction):
  • API/JSCallbackFunction.h:
  • VM/Machine.cpp: (KJS::Machine::privateExecute):
  • kjs/ExecState.h: (KJS::ExecState::regExpTable): (KJS::ExecState::regExpConstructorTable):
  • kjs/JSGlobalData.cpp: (KJS::JSGlobalData::JSGlobalData): (KJS::JSGlobalData::~JSGlobalData):
  • kjs/JSGlobalData.h:
  • kjs/JSGlobalObject.cpp: (KJS::JSGlobalObject::reset):
  • kjs/JSGlobalObject.h: (KJS::JSGlobalObject::objectConstructor): (KJS::JSGlobalObject::functionConstructor): (KJS::JSGlobalObject::arrayConstructor): (KJS::JSGlobalObject::booleanConstructor): (KJS::JSGlobalObject::stringConstructor): (KJS::JSGlobalObject::numberConstructor): (KJS::JSGlobalObject::dateConstructor): (KJS::JSGlobalObject::regExpConstructor): (KJS::JSGlobalObject::errorConstructor): (KJS::JSGlobalObject::evalErrorConstructor): (KJS::JSGlobalObject::rangeErrorConstructor): (KJS::JSGlobalObject::referenceErrorConstructor): (KJS::JSGlobalObject::syntaxErrorConstructor): (KJS::JSGlobalObject::typeErrorConstructor): (KJS::JSGlobalObject::URIErrorConstructor):
  • kjs/array_object.cpp: (KJS::ArrayConstructor::ArrayConstructor): (KJS::ArrayConstructor::getConstructData): (KJS::ArrayConstructor::construct): (KJS::ArrayConstructor::callAsFunction):
  • kjs/array_object.h:
  • kjs/bool_object.cpp: (KJS::BooleanObject::BooleanObject): (KJS::BooleanPrototype::BooleanPrototype): (KJS::booleanProtoFuncToString): (KJS::booleanProtoFuncValueOf): (KJS::BooleanConstructor::BooleanConstructor): (KJS::BooleanConstructor::getConstructData): (KJS::BooleanConstructor::construct): (KJS::BooleanConstructor::callAsFunction):
  • kjs/bool_object.h:
  • kjs/date_object.cpp: (KJS::DatePrototype::DatePrototype): (KJS::DateConstructor::DateConstructor): (KJS::DateConstructor::getConstructData): (KJS::DateConstructor::construct): (KJS::DateConstructor::callAsFunction): (KJS::DateFunction::DateFunction): (KJS::DateFunction::callAsFunction):
  • kjs/date_object.h:
  • kjs/error_object.cpp: (KJS::ErrorPrototype::ErrorPrototype): (KJS::ErrorConstructor::ErrorConstructor): (KJS::ErrorConstructor::getConstructData): (KJS::ErrorConstructor::construct): (KJS::ErrorConstructor::callAsFunction): (KJS::NativeErrorConstructor::NativeErrorConstructor): (KJS::NativeErrorConstructor::getConstructData): (KJS::NativeErrorConstructor::construct): (KJS::NativeErrorConstructor::callAsFunction): (KJS::NativeErrorConstructor::mark):
  • kjs/error_object.h:
  • kjs/function.cpp: (KJS::JSFunction::JSFunction): (KJS::JSFunction::mark): (KJS::JSFunction::getOwnPropertySlot): (KJS::JSFunction::put): (KJS::JSFunction::deleteProperty): (KJS::PrototypeFunction::PrototypeFunction): (KJS::PrototypeReflexiveFunction::PrototypeReflexiveFunction): (KJS::PrototypeReflexiveFunction::mark):
  • kjs/function.h:
  • kjs/function_object.cpp: (KJS::functionProtoFuncToString): (KJS::FunctionConstructor::FunctionConstructor): (KJS::FunctionConstructor::getConstructData): (KJS::FunctionConstructor::construct): (KJS::FunctionConstructor::callAsFunction):
  • kjs/function_object.h:
  • kjs/internal.cpp: (KJS::StringObject::create): (KJS::JSString::toObject): (KJS::JSString::toThisObject): (KJS::JSString::getOwnPropertySlot): (KJS::InternalFunction::InternalFunction): (KJS::InternalFunction::getCallData): (KJS::InternalFunction::implementsHasInstance):
  • kjs/math_object.cpp: (KJS::MathObject::MathObject): (KJS::MathObject::getOwnPropertySlot): (KJS::MathObject::getValueProperty):
  • kjs/math_object.h:
  • kjs/number_object.cpp: (KJS::NumberObject::NumberObject): (KJS::NumberPrototype::NumberPrototype): (KJS::numberProtoFuncToString): (KJS::numberProtoFuncToLocaleString): (KJS::numberProtoFuncValueOf): (KJS::numberProtoFuncToFixed): (KJS::numberProtoFuncToExponential): (KJS::numberProtoFuncToPrecision): (KJS::NumberConstructor::NumberConstructor): (KJS::NumberConstructor::getOwnPropertySlot): (KJS::NumberConstructor::getValueProperty): (KJS::NumberConstructor::getConstructData): (KJS::NumberConstructor::construct): (KJS::NumberConstructor::callAsFunction):
  • kjs/number_object.h:
  • kjs/object.cpp: (KJS::JSObject::putDirectFunction):
  • kjs/object.h:
  • kjs/object_object.cpp: (KJS::ObjectConstructor::ObjectConstructor): (KJS::ObjectConstructor::getConstructData): (KJS::ObjectConstructor::construct): (KJS::ObjectConstructor::callAsFunction):
  • kjs/object_object.h:
  • kjs/regexp.cpp: (KJS::RegExp::RegExp):
  • kjs/regexp_object.cpp: (KJS::regExpProtoFuncTest): (KJS::regExpProtoFuncExec): (KJS::regExpProtoFuncCompile): (KJS::regExpProtoFuncToString): (KJS::RegExpObject::RegExpObject): (KJS::RegExpObject::~RegExpObject): (KJS::RegExpObject::getOwnPropertySlot): (KJS::RegExpObject::getValueProperty): (KJS::RegExpObject::put): (KJS::RegExpObject::putValueProperty): (KJS::RegExpObject::match): (KJS::RegExpObject::test): (KJS::RegExpObject::exec): (KJS::RegExpObject::getCallData): (KJS::RegExpObject::callAsFunction): (KJS::RegExpConstructorPrivate::RegExpConstructorPrivate): (KJS::RegExpConstructor::RegExpConstructor): (KJS::RegExpConstructor::performMatch): (KJS::RegExpMatchesArray::RegExpMatchesArray): (KJS::RegExpMatchesArray::~RegExpMatchesArray): (KJS::RegExpMatchesArray::fillArrayInstance): (KJS::RegExpConstructor::arrayOfMatches): (KJS::RegExpConstructor::getBackref): (KJS::RegExpConstructor::getLastParen): (KJS::RegExpConstructor::getLeftContext): (KJS::RegExpConstructor::getRightContext): (KJS::RegExpConstructor::getOwnPropertySlot): (KJS::RegExpConstructor::getValueProperty): (KJS::RegExpConstructor::put): (KJS::RegExpConstructor::putValueProperty): (KJS::RegExpConstructor::getConstructData): (KJS::RegExpConstructor::construct): (KJS::RegExpConstructor::callAsFunction): (KJS::RegExpConstructor::input):
  • kjs/regexp_object.h:
  • kjs/string_object.cpp: (KJS::StringObject::StringObject): (KJS::StringObject::getOwnPropertySlot): (KJS::StringObject::put): (KJS::StringObject::deleteProperty): (KJS::StringObject::getPropertyNames): (KJS::StringPrototype::StringPrototype): (KJS::StringPrototype::getOwnPropertySlot): (KJS::replace): (KJS::stringProtoFuncToString): (KJS::stringProtoFuncValueOf): (KJS::stringProtoFuncCharAt): (KJS::stringProtoFuncCharCodeAt): (KJS::stringProtoFuncConcat): (KJS::stringProtoFuncIndexOf): (KJS::stringProtoFuncLastIndexOf): (KJS::stringProtoFuncMatch): (KJS::stringProtoFuncSearch): (KJS::stringProtoFuncReplace): (KJS::stringProtoFuncSlice): (KJS::stringProtoFuncSplit): (KJS::stringProtoFuncSubstr): (KJS::stringProtoFuncSubstring): (KJS::stringProtoFuncToLowerCase): (KJS::stringProtoFuncToUpperCase): (KJS::stringProtoFuncToLocaleLowerCase): (KJS::stringProtoFuncToLocaleUpperCase): (KJS::stringProtoFuncLocaleCompare): (KJS::stringProtoFuncBig): (KJS::stringProtoFuncSmall): (KJS::stringProtoFuncBlink): (KJS::stringProtoFuncBold): (KJS::stringProtoFuncFixed): (KJS::stringProtoFuncItalics): (KJS::stringProtoFuncStrike): (KJS::stringProtoFuncSub): (KJS::stringProtoFuncSup): (KJS::stringProtoFuncFontcolor): (KJS::stringProtoFuncFontsize): (KJS::stringProtoFuncAnchor): (KJS::stringProtoFuncLink): (KJS::StringConstructor::StringConstructor): (KJS::StringConstructor::getConstructData): (KJS::StringConstructor::construct): (KJS::StringConstructor::callAsFunction): (KJS::StringConstructorFunction::StringConstructorFunction): (KJS::StringConstructorFunction::callAsFunction):
  • kjs/string_object.h: (KJS::StringObjectThatMasqueradesAsUndefined::StringObjectThatMasqueradesAsUndefined):
  • profiler/Profiler.cpp: (KJS::createCallIdentifier):

WebCore:

2008-06-15 Darin Adler <Darin Adler>

Rubber stamped by Sam.

  • cut down on confusing uses of "Object" and "Imp" in JavaScriptCore class names
  • bindings/js/JSCSSStyleDeclarationCustom.cpp: (WebCore::JSCSSStyleDeclaration::nameGetter):
  • bridge/qt/qt_runtime.cpp: (KJS::Bindings::valueRealType): (KJS::Bindings::convertValueToQVariant): (KJS::Bindings::convertQVariantToValue): (KJS::Bindings::QtRuntimeMethod::QtRuntimeMethod):
  • bridge/qt/qt_runtime.h:
  • bridge/runtime_method.cpp: (RuntimeMethod::RuntimeMethod): (RuntimeMethod::getOwnPropertySlot):
  • bridge/runtime_method.h:

WebKitTools:

2008-06-15 Darin Adler <Darin Adler>

  • Scripts/create-exports: Added.
  • Scripts/do-file-rename: Added some planned renames.
  • Scripts/do-webcore-rename: Updated for the latest round of renaming.
File:
1 edited

Legend:

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

    r34578 r34580  
    6262JSValue* regExpProtoFuncTest(ExecState* exec, JSObject* thisObj, const List& args)
    6363{
    64     if (!thisObj->inherits(&RegExpImp::info))
     64    if (!thisObj->inherits(&RegExpObject::info))
    6565        return throwError(exec, TypeError);
    6666
    67     return static_cast<RegExpImp*>(thisObj)->test(exec, args);
     67    return static_cast<RegExpObject*>(thisObj)->test(exec, args);
    6868}
    6969
    7070JSValue* regExpProtoFuncExec(ExecState* exec, JSObject* thisObj, const List& args)
    7171{
    72     if (!thisObj->inherits(&RegExpImp::info))
     72    if (!thisObj->inherits(&RegExpObject::info))
    7373        return throwError(exec, TypeError);
    7474
    75     return static_cast<RegExpImp*>(thisObj)->exec(exec, args);
     75    return static_cast<RegExpObject*>(thisObj)->exec(exec, args);
    7676}
    7777
    7878JSValue* regExpProtoFuncCompile(ExecState* exec, JSObject* thisObj, const List& args)
    7979{
    80     if (!thisObj->inherits(&RegExpImp::info))
     80    if (!thisObj->inherits(&RegExpObject::info))
    8181        return throwError(exec, TypeError);
    8282
     
    8585    JSValue* arg1 = args[1];
    8686   
    87     if (arg0->isObject(&RegExpImp::info)) {
     87    if (arg0->isObject(&RegExpObject::info)) {
    8888        if (!arg1->isUndefined())
    8989            return throwError(exec, TypeError, "Cannot supply flags when constructing one RegExp from another.");
    90         regExp = static_cast<RegExpImp*>(arg0)->regExp();
     90        regExp = static_cast<RegExpObject*>(arg0)->regExp();
    9191    } else {
    9292        UString pattern = args.isEmpty() ? UString("") : arg0->toString(exec);
     
    9898        return throwError(exec, SyntaxError, UString("Invalid regular expression: ").append(regExp->errorMessage()));
    9999
    100     static_cast<RegExpImp*>(thisObj)->setRegExp(regExp.release());
    101     static_cast<RegExpImp*>(thisObj)->setLastIndex(0);
     100    static_cast<RegExpObject*>(thisObj)->setRegExp(regExp.release());
     101    static_cast<RegExpObject*>(thisObj)->setLastIndex(0);
    102102    return jsUndefined();
    103103}
     
    105105JSValue* regExpProtoFuncToString(ExecState* exec, JSObject* thisObj, const List&)
    106106{
    107     if (!thisObj->inherits(&RegExpImp::info)) {
     107    if (!thisObj->inherits(&RegExpObject::info)) {
    108108        if (thisObj->inherits(&RegExpPrototype::info))
    109109            return jsString("//");
     
    121121}
    122122
    123 // ------------------------------ RegExpImp ------------------------------------
    124 
    125 const ClassInfo RegExpImp::info = { "RegExp", 0, 0, ExecState::RegExpImpTable };
     123// ------------------------------ RegExpObject ------------------------------------
     124
     125const ClassInfo RegExpObject::info = { "RegExp", 0, 0, ExecState::regExpTable };
    126126
    127127/* Source for regexp_object.lut.h
    128 @begin RegExpImpTable 5
    129     global        RegExpImp::Global       DontDelete|ReadOnly|DontEnum
    130     ignoreCase    RegExpImp::IgnoreCase   DontDelete|ReadOnly|DontEnum
    131     multiline     RegExpImp::Multiline    DontDelete|ReadOnly|DontEnum
    132     source        RegExpImp::Source       DontDelete|ReadOnly|DontEnum
    133     lastIndex     RegExpImp::LastIndex    DontDelete|DontEnum
     128@begin regExpTable 5
     129    global        RegExpObject::Global       DontDelete|ReadOnly|DontEnum
     130    ignoreCase    RegExpObject::IgnoreCase   DontDelete|ReadOnly|DontEnum
     131    multiline     RegExpObject::Multiline    DontDelete|ReadOnly|DontEnum
     132    source        RegExpObject::Source       DontDelete|ReadOnly|DontEnum
     133    lastIndex     RegExpObject::LastIndex    DontDelete|DontEnum
    134134@end
    135135*/
    136136
    137 RegExpImp::RegExpImp(RegExpPrototype* regexpProto, PassRefPtr<RegExp> regExp)
     137RegExpObject::RegExpObject(RegExpPrototype* regexpProto, PassRefPtr<RegExp> regExp)
    138138  : JSObject(regexpProto)
    139139  , m_regExp(regExp)
     
    142142}
    143143
    144 RegExpImp::~RegExpImp()
    145 {
    146 }
    147 
    148 bool RegExpImp::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
    149 {
    150   return getStaticValueSlot<RegExpImp, JSObject>(exec, ExecState::RegExpImpTable(exec), this, propertyName, slot);
    151 }
    152 
    153 JSValue* RegExpImp::getValueProperty(ExecState*, int token) const
     144RegExpObject::~RegExpObject()
     145{
     146}
     147
     148bool RegExpObject::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
     149{
     150  return getStaticValueSlot<RegExpObject, JSObject>(exec, ExecState::regExpTable(exec), this, propertyName, slot);
     151}
     152
     153JSValue* RegExpObject::getValueProperty(ExecState*, int token) const
    154154{
    155155    switch (token) {
     
    170170}
    171171
    172 void RegExpImp::put(ExecState* exec, const Identifier& propertyName, JSValue* value)
    173 {
    174     lookupPut<RegExpImp, JSObject>(exec, propertyName, value, ExecState::RegExpImpTable(exec), this);
    175 }
    176 
    177 void RegExpImp::putValueProperty(ExecState* exec, int token, JSValue* value)
     172void RegExpObject::put(ExecState* exec, const Identifier& propertyName, JSValue* value)
     173{
     174    lookupPut<RegExpObject, JSObject>(exec, propertyName, value, ExecState::regExpTable(exec), this);
     175}
     176
     177void RegExpObject::putValueProperty(ExecState* exec, int token, JSValue* value)
    178178{
    179179    UNUSED_PARAM(token);
     
    182182}
    183183
    184 bool RegExpImp::match(ExecState* exec, const List& args)
    185 {
    186     RegExpObjectImp* regExpObj = exec->lexicalGlobalObject()->regExpConstructor();
     184bool RegExpObject::match(ExecState* exec, const List& args)
     185{
     186    RegExpConstructor* regExpObj = exec->lexicalGlobalObject()->regExpConstructor();
    187187
    188188    UString input;
     
    219219}
    220220
    221 JSValue* RegExpImp::test(ExecState* exec, const List& args)
     221JSValue* RegExpObject::test(ExecState* exec, const List& args)
    222222{
    223223    return jsBoolean(match(exec, args));
    224224}
    225225
    226 JSValue* RegExpImp::exec(ExecState* exec, const List& args)
     226JSValue* RegExpObject::exec(ExecState* exec, const List& args)
    227227{
    228228    return match(exec, args)
     
    231231}
    232232
    233 CallType RegExpImp::getCallData(CallData&)
     233CallType RegExpObject::getCallData(CallData&)
    234234{
    235235    return CallTypeNative;
    236236}
    237237
    238 JSValue* RegExpImp::callAsFunction(ExecState* exec, JSObject*, const List& args)
    239 {
    240     return RegExpImp::exec(exec, args);
    241 }
    242 
    243 // ------------------------------ RegExpObjectImp ------------------------------
    244 
    245 const ClassInfo RegExpObjectImp::info = { "Function", &InternalFunctionImp::info, 0, ExecState::RegExpObjectImpTable };
     238JSValue* RegExpObject::callAsFunction(ExecState* exec, JSObject*, const List& args)
     239{
     240    return RegExpObject::exec(exec, args);
     241}
     242
     243// ------------------------------ RegExpConstructor ------------------------------
     244
     245const ClassInfo RegExpConstructor::info = { "Function", &InternalFunction::info, 0, ExecState::regExpConstructorTable };
    246246
    247247/* Source for regexp_object.lut.h
    248 @begin RegExpObjectImpTable 21
    249   input           RegExpObjectImp::Input          None
    250   $_              RegExpObjectImp::Input          DontEnum
    251   multiline       RegExpObjectImp::Multiline      None
    252   $*              RegExpObjectImp::Multiline      DontEnum
    253   lastMatch       RegExpObjectImp::LastMatch      DontDelete|ReadOnly
    254   $&              RegExpObjectImp::LastMatch      DontDelete|ReadOnly|DontEnum
    255   lastParen       RegExpObjectImp::LastParen      DontDelete|ReadOnly
    256   $+              RegExpObjectImp::LastParen      DontDelete|ReadOnly|DontEnum
    257   leftContext     RegExpObjectImp::LeftContext    DontDelete|ReadOnly
    258   $`              RegExpObjectImp::LeftContext    DontDelete|ReadOnly|DontEnum
    259   rightContext    RegExpObjectImp::RightContext   DontDelete|ReadOnly
    260   $'              RegExpObjectImp::RightContext   DontDelete|ReadOnly|DontEnum
    261   $1              RegExpObjectImp::Dollar1        DontDelete|ReadOnly
    262   $2              RegExpObjectImp::Dollar2        DontDelete|ReadOnly
    263   $3              RegExpObjectImp::Dollar3        DontDelete|ReadOnly
    264   $4              RegExpObjectImp::Dollar4        DontDelete|ReadOnly
    265   $5              RegExpObjectImp::Dollar5        DontDelete|ReadOnly
    266   $6              RegExpObjectImp::Dollar6        DontDelete|ReadOnly
    267   $7              RegExpObjectImp::Dollar7        DontDelete|ReadOnly
    268   $8              RegExpObjectImp::Dollar8        DontDelete|ReadOnly
    269   $9              RegExpObjectImp::Dollar9        DontDelete|ReadOnly
     248@begin regExpConstructorTable 21
     249  input           RegExpConstructor::Input          None
     250  $_              RegExpConstructor::Input          DontEnum
     251  multiline       RegExpConstructor::Multiline      None
     252  $*              RegExpConstructor::Multiline      DontEnum
     253  lastMatch       RegExpConstructor::LastMatch      DontDelete|ReadOnly
     254  $&              RegExpConstructor::LastMatch      DontDelete|ReadOnly|DontEnum
     255  lastParen       RegExpConstructor::LastParen      DontDelete|ReadOnly
     256  $+              RegExpConstructor::LastParen      DontDelete|ReadOnly|DontEnum
     257  leftContext     RegExpConstructor::LeftContext    DontDelete|ReadOnly
     258  $`              RegExpConstructor::LeftContext    DontDelete|ReadOnly|DontEnum
     259  rightContext    RegExpConstructor::RightContext   DontDelete|ReadOnly
     260  $'              RegExpConstructor::RightContext   DontDelete|ReadOnly|DontEnum
     261  $1              RegExpConstructor::Dollar1        DontDelete|ReadOnly
     262  $2              RegExpConstructor::Dollar2        DontDelete|ReadOnly
     263  $3              RegExpConstructor::Dollar3        DontDelete|ReadOnly
     264  $4              RegExpConstructor::Dollar4        DontDelete|ReadOnly
     265  $5              RegExpConstructor::Dollar5        DontDelete|ReadOnly
     266  $6              RegExpConstructor::Dollar6        DontDelete|ReadOnly
     267  $7              RegExpConstructor::Dollar7        DontDelete|ReadOnly
     268  $8              RegExpConstructor::Dollar8        DontDelete|ReadOnly
     269  $9              RegExpConstructor::Dollar9        DontDelete|ReadOnly
    270270@end
    271271*/
    272272
    273 struct RegExpObjectImpPrivate {
     273struct RegExpConstructorPrivate {
    274274  // Global search cache / settings
    275   RegExpObjectImpPrivate() : lastNumSubPatterns(0), multiline(false) { }
     275  RegExpConstructorPrivate() : lastNumSubPatterns(0), multiline(false) { }
    276276  UString lastInput;
    277277  OwnArrayPtr<int> lastOvector;
     
    280280};
    281281
    282 RegExpObjectImp::RegExpObjectImp(ExecState* exec, FunctionPrototype* funcProto, RegExpPrototype* regProto)
    283   : InternalFunctionImp(funcProto, "RegExp")
    284   , d(new RegExpObjectImpPrivate)
     282RegExpConstructor::RegExpConstructor(ExecState* exec, FunctionPrototype* funcProto, RegExpPrototype* regProto)
     283  : InternalFunction(funcProto, "RegExp")
     284  , d(new RegExpConstructorPrivate)
    285285{
    286286  // ECMA 15.10.5.1 RegExp.prototype
     
    296296  e.g., RegExp.lastMatch and RegExp.leftParen.
    297297*/
    298 void RegExpObjectImp::performMatch(RegExp* r, const UString& s, int startOffset, int& position, int& length, int** ovector)
     298void RegExpConstructor::performMatch(RegExp* r, const UString& s, int startOffset, int& position, int& length, int** ovector)
    299299{
    300300  OwnArrayPtr<int> tmpOvector;
     
    317317class RegExpMatchesArray : public JSArray {
    318318public:
    319     RegExpMatchesArray(ExecState*, RegExpObjectImpPrivate*);
     319    RegExpMatchesArray(ExecState*, RegExpConstructorPrivate*);
    320320
    321321    virtual ~RegExpMatchesArray();
     
    333333};
    334334
    335 RegExpMatchesArray::RegExpMatchesArray(ExecState* exec, RegExpObjectImpPrivate* data)
     335RegExpMatchesArray::RegExpMatchesArray(ExecState* exec, RegExpConstructorPrivate* data)
    336336    : JSArray(exec->lexicalGlobalObject()->arrayPrototype(), data->lastNumSubPatterns + 1)
    337337{
    338     RegExpObjectImpPrivate* d = new RegExpObjectImpPrivate;
     338    RegExpConstructorPrivate* d = new RegExpConstructorPrivate;
    339339    d->lastInput = data->lastInput;
    340340    d->lastNumSubPatterns = data->lastNumSubPatterns;
     
    349349RegExpMatchesArray::~RegExpMatchesArray()
    350350{
    351     delete static_cast<RegExpObjectImpPrivate*>(lazyCreationData());
     351    delete static_cast<RegExpConstructorPrivate*>(lazyCreationData());
    352352}
    353353
    354354void RegExpMatchesArray::fillArrayInstance(ExecState* exec)
    355355{
    356     RegExpObjectImpPrivate* d = static_cast<RegExpObjectImpPrivate*>(lazyCreationData());
     356    RegExpConstructorPrivate* d = static_cast<RegExpConstructorPrivate*>(lazyCreationData());
    357357    ASSERT(d);
    358358
     
    371371}
    372372
    373 JSObject* RegExpObjectImp::arrayOfMatches(ExecState* exec) const
     373JSObject* RegExpConstructor::arrayOfMatches(ExecState* exec) const
    374374{
    375375    return new RegExpMatchesArray(exec, d.get());
    376376}
    377377
    378 JSValue* RegExpObjectImp::getBackref(unsigned i) const
     378JSValue* RegExpConstructor::getBackref(unsigned i) const
    379379{
    380380  if (d->lastOvector && i <= d->lastNumSubPatterns)
     
    383383}
    384384
    385 JSValue* RegExpObjectImp::getLastParen() const
     385JSValue* RegExpConstructor::getLastParen() const
    386386{
    387387  unsigned i = d->lastNumSubPatterns;
     
    393393}
    394394
    395 JSValue *RegExpObjectImp::getLeftContext() const
     395JSValue *RegExpConstructor::getLeftContext() const
    396396{
    397397  if (d->lastOvector)
     
    400400}
    401401
    402 JSValue *RegExpObjectImp::getRightContext() const
     402JSValue *RegExpConstructor::getRightContext() const
    403403{
    404404  if (d->lastOvector) {
     
    409409}
    410410
    411 bool RegExpObjectImp::getOwnPropertySlot(ExecState *exec, const Identifier& propertyName, PropertySlot& slot)
    412 {
    413   return getStaticValueSlot<RegExpObjectImp, InternalFunctionImp>(exec, ExecState::RegExpObjectImpTable(exec), this, propertyName, slot);
    414 }
    415 
    416 JSValue *RegExpObjectImp::getValueProperty(ExecState*, int token) const
     411bool RegExpConstructor::getOwnPropertySlot(ExecState *exec, const Identifier& propertyName, PropertySlot& slot)
     412{
     413  return getStaticValueSlot<RegExpConstructor, InternalFunction>(exec, ExecState::regExpConstructorTable(exec), this, propertyName, slot);
     414}
     415
     416JSValue *RegExpConstructor::getValueProperty(ExecState*, int token) const
    417417{
    418418  switch (token) {
     
    454454}
    455455
    456 void RegExpObjectImp::put(ExecState *exec, const Identifier &propertyName, JSValue *value)
    457 {
    458     lookupPut<RegExpObjectImp, InternalFunctionImp>(exec, propertyName, value, ExecState::RegExpObjectImpTable(exec), this);
    459 }
    460 
    461 void RegExpObjectImp::putValueProperty(ExecState *exec, int token, JSValue *value)
     456void RegExpConstructor::put(ExecState *exec, const Identifier &propertyName, JSValue *value)
     457{
     458    lookupPut<RegExpConstructor, InternalFunction>(exec, propertyName, value, ExecState::regExpConstructorTable(exec), this);
     459}
     460
     461void RegExpConstructor::putValueProperty(ExecState *exec, int token, JSValue *value)
    462462{
    463463  switch (token) {
     
    473473}
    474474 
    475 ConstructType RegExpObjectImp::getConstructData(ConstructData&)
     475ConstructType RegExpConstructor::getConstructData(ConstructData&)
    476476{
    477477    return ConstructTypeNative;
     
    479479
    480480// ECMA 15.10.4
    481 JSObject *RegExpObjectImp::construct(ExecState *exec, const List &args)
     481JSObject *RegExpConstructor::construct(ExecState *exec, const List &args)
    482482{
    483483  JSValue* arg0 = args[0];
    484484  JSValue* arg1 = args[1];
    485485 
    486   if (arg0->isObject(&RegExpImp::info)) {
     486  if (arg0->isObject(&RegExpObject::info)) {
    487487    if (!arg1->isUndefined())
    488488      return throwError(exec, TypeError, "Cannot supply flags when constructing one RegExp from another.");
     
    495495  RefPtr<RegExp> regExp = RegExp::create(pattern, flags);
    496496  return regExp->isValid()
    497     ? new RegExpImp(exec->lexicalGlobalObject()->regExpPrototype(), regExp.release())
     497    ? new RegExpObject(exec->lexicalGlobalObject()->regExpPrototype(), regExp.release())
    498498    : throwError(exec, SyntaxError, UString("Invalid regular expression: ").append(regExp->errorMessage()));
    499499}
    500500
    501501// ECMA 15.10.3
    502 JSValue *RegExpObjectImp::callAsFunction(ExecState *exec, JSObject * /*thisObj*/, const List &args)
     502JSValue *RegExpConstructor::callAsFunction(ExecState *exec, JSObject * /*thisObj*/, const List &args)
    503503{
    504504  return construct(exec, args);
    505505}
    506506
    507 const UString& RegExpObjectImp::input() const
     507const UString& RegExpConstructor::input() const
    508508{
    509509    // Can detect a distinct initial state that is invisible to JavaScript, by checking for null
Note: See TracChangeset for help on using the changeset viewer.