Commit 6de4edca authored by darin@apple.com's avatar darin@apple.com

JavaScriptCore:

2008-06-15  Darin Adler  <darin@apple.com>

        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@apple.com>

        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@apple.com>

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



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34580 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 8291e207
......@@ -36,15 +36,15 @@
namespace KJS {
const ClassInfo JSCallbackFunction::info = { "CallbackFunction", &InternalFunctionImp::info, 0, 0 };
const ClassInfo JSCallbackFunction::info = { "CallbackFunction", &InternalFunction::info, 0, 0 };
JSCallbackFunction::JSCallbackFunction(ExecState* exec, JSObjectCallAsFunctionCallback callback, const Identifier& name)
: InternalFunctionImp(exec->lexicalGlobalObject()->functionPrototype(), name)
: InternalFunction(exec->lexicalGlobalObject()->functionPrototype(), name)
, m_callback(callback)
{
}
// InternalFunctionImp mish-mashes constructor and function behavior -- we should
// InternalFunction mish-mashes constructor and function behavior -- we should
// refactor the code so this override isn't necessary
bool JSCallbackFunction::implementsHasInstance() const {
return false;
......
......@@ -33,7 +33,7 @@
namespace KJS {
class JSCallbackFunction : public InternalFunctionImp
class JSCallbackFunction : public InternalFunction
{
public:
JSCallbackFunction(ExecState* exec, JSObjectCallAsFunctionCallback callback, const Identifier& name);
......
This diff is collapsed.
......@@ -100,6 +100,13 @@ __ZN3KJS11PropertyMapD1Ev
__ZN3KJS12DateInstance4infoE
__ZN3KJS12PropertySlot15undefinedGetterEPNS_9ExecStateERKNS_10IdentifierERKS0_
__ZN3KJS12RegisterFile14addGlobalSlotsEm
__ZN3KJS12StringObject14deletePropertyEPNS_9ExecStateERKNS_10IdentifierE
__ZN3KJS12StringObject16getPropertyNamesEPNS_9ExecStateERNS_17PropertyNameArrayE
__ZN3KJS12StringObject18getOwnPropertySlotEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE
__ZN3KJS12StringObject18getOwnPropertySlotEPNS_9ExecStateEjRNS_12PropertySlotE
__ZN3KJS12StringObject3putEPNS_9ExecStateERKNS_10IdentifierEPNS_7JSValueE
__ZN3KJS12StringObject4infoE
__ZN3KJS12StringObjectC2EPNS_8JSObjectERKNS_7UStringE
__ZN3KJS13CodeGenerator21setDumpsGeneratedCodeEb
__ZN3KJS13StatementNode6setLocEii
__ZN3KJS13jsOwnedStringERKNS_7UStringE
......@@ -113,14 +120,10 @@ __ZN3KJS14JSGlobalObject3putEPNS_9ExecStateERKNS_10IdentifierEPNS_7JSValueE
__ZN3KJS14JSGlobalObject4initEPNS_8JSObjectE
__ZN3KJS14JSGlobalObject4markEv
__ZN3KJS14JSGlobalObjectD2Ev
__ZN3KJS14StringInstance14deletePropertyEPNS_9ExecStateERKNS_10IdentifierE
__ZN3KJS14StringInstance16getPropertyNamesEPNS_9ExecStateERNS_17PropertyNameArrayE
__ZN3KJS14StringInstance18getOwnPropertySlotEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE
__ZN3KJS14StringInstance18getOwnPropertySlotEPNS_9ExecStateEjRNS_12PropertySlotE
__ZN3KJS14StringInstance3putEPNS_9ExecStateERKNS_10IdentifierEPNS_7JSValueE
__ZN3KJS14StringInstance4infoE
__ZN3KJS14StringInstanceC2EPNS_8JSObjectERKNS_7UStringE
__ZN3KJS15JSWrapperObject4markEv
__ZN3KJS16InternalFunction11getCallDataERNS_8CallDataE
__ZN3KJS16InternalFunction4infoE
__ZN3KJS16InternalFunctionC2EPNS_17FunctionPrototypeERKNS_10IdentifierE
__ZN3KJS16JSVariableObject14deletePropertyEPNS_9ExecStateERKNS_10IdentifierE
__ZN3KJS16JSVariableObject16getPropertyNamesEPNS_9ExecStateERNS_17PropertyNameArrayE
__ZN3KJS16ParserRefCounted3refEv
......@@ -129,9 +132,6 @@ __ZN3KJS17PropertyNameArray3addEPNS_7UString3RepE
__ZN3KJS17PrototypeFunctionC1EPNS_9ExecStateEPNS_17FunctionPrototypeEiRKNS_10IdentifierEPFPNS_7JSValueES2_PNS_8JSObjectERKNS_4ListEE
__ZN3KJS17PrototypeFunctionC1EPNS_9ExecStateEiRKNS_10IdentifierEPFPNS_7JSValueES2_PNS_8JSObjectERKNS_4ListEE
__ZN3KJS17RegisterFileStack20allocateRegisterFileEmPS0_
__ZN3KJS19InternalFunctionImp11getCallDataERNS_8CallDataE
__ZN3KJS19InternalFunctionImp4infoE
__ZN3KJS19InternalFunctionImpC2EPNS_17FunctionPrototypeERKNS_10IdentifierE
__ZN3KJS19initializeThreadingEv
__ZN3KJS23objectProtoFuncToStringEPNS_9ExecStateEPNS_8JSObjectERKNS_4ListE
__ZN3KJS4List10slowAppendEPNS_7JSValueE
......@@ -181,7 +181,7 @@ __ZN3KJS8JSObject14deletePropertyEPNS_9ExecStateERKNS_10IdentifierE
__ZN3KJS8JSObject14deletePropertyEPNS_9ExecStateEj
__ZN3KJS8JSObject14implementsCallEv
__ZN3KJS8JSObject16getPropertyNamesEPNS_9ExecStateERNS_17PropertyNameArrayE
__ZN3KJS8JSObject17putDirectFunctionEPNS_19InternalFunctionImpEi
__ZN3KJS8JSObject17putDirectFunctionEPNS_16InternalFunctionEi
__ZN3KJS8JSObject17putWithAttributesEPNS_9ExecStateERKNS_10IdentifierEPNS_7JSValueEj
__ZN3KJS8JSObject17putWithAttributesEPNS_9ExecStateEjPNS_7JSValueEj
__ZN3KJS8JSObject18getOwnPropertySlotEPNS_9ExecStateEjRNS_12PropertySlotE
......@@ -241,12 +241,12 @@ __ZNK3KJS11PropertyMap3getERKNS_10IdentifierE
__ZNK3KJS12DateInstance7getTimeERdRi
__ZNK3KJS14JSGlobalObject14isDynamicScopeEv
__ZNK3KJS14JSGlobalObject14toGlobalObjectEPNS_9ExecStateE
__ZNK3KJS16InternalFunction21implementsHasInstanceEv
__ZNK3KJS16JSVariableObject16isVariableObjectEv
__ZNK3KJS16JSVariableObject21getPropertyAttributesEPNS_9ExecStateERKNS_10IdentifierERj
__ZNK3KJS17DebuggerCallFrame10thisObjectEv
__ZNK3KJS17DebuggerCallFrame12functionNameEv
__ZNK3KJS17DebuggerCallFrame8evaluateERKNS_7UStringERPNS_7JSValueE
__ZNK3KJS19InternalFunctionImp21implementsHasInstanceEv
__ZNK3KJS4List8getSliceEiRS0_
__ZNK3KJS4Node8toStringEv
__ZNK3KJS6JSCell12toThisObjectEPNS_9ExecStateE
......@@ -285,11 +285,11 @@ __ZNK3KJS8JSObject9toBooleanEPNS_9ExecStateE
__ZNK3KJS9HashTable11createTableEv
__ZNK3WTF8Collator7collateEPKtmS2_m
__ZTVN3KJS12JSNumberCellE
__ZTVN3KJS12StringObjectE
__ZTVN3KJS14JSGlobalObjectE
__ZTVN3KJS14StringInstanceE
__ZTVN3KJS15JSWrapperObjectE
__ZTVN3KJS16InternalFunctionE
__ZTVN3KJS16JSVariableObjectE
__ZTVN3KJS19InternalFunctionImpE
__ZTVN3KJS8JSObjectE
_jscore_collector_introspection
_jscore_fastmalloc_introspection
......
......@@ -970,7 +970,7 @@ JSValue* Machine::privateExecute(ExecutionFlag flag, ExecState* exec, RegisterFi
*/
int dst = (++vPC)->u.operand;
int regExp = (++vPC)->u.operand;
r[dst].u.jsValue = new RegExpImp(scopeChain->globalObject()->regExpPrototype(), codeBlock->regexps[regExp]);
r[dst].u.jsValue = new RegExpObject(scopeChain->globalObject()->regExpPrototype(), codeBlock->regexps[regExp]);
++vPC;
NEXT_OPCODE;
......
......@@ -88,8 +88,8 @@ namespace KJS {
static const HashTable* dateTable(ExecState* exec) { return exec->m_globalData->dateTable; }
static const HashTable* mathTable(ExecState* exec) { return exec->m_globalData->mathTable; }
static const HashTable* numberTable(ExecState* exec) { return exec->m_globalData->numberTable; }
static const HashTable* RegExpImpTable(ExecState* exec) { return exec->m_globalData->RegExpImpTable; }
static const HashTable* RegExpObjectImpTable(ExecState* exec) { return exec->m_globalData->RegExpObjectImpTable; }
static const HashTable* regExpTable(ExecState* exec) { return exec->m_globalData->regExpTable; }
static const HashTable* regExpConstructorTable(ExecState* exec) { return exec->m_globalData->regExpConstructorTable; }
static const HashTable* stringTable(ExecState* exec) { return exec->m_globalData->stringTable; }
private:
......
......@@ -49,8 +49,8 @@ extern const HashTable arrayTable;
extern const HashTable dateTable;
extern const HashTable mathTable;
extern const HashTable numberTable;
extern const HashTable RegExpImpTable;
extern const HashTable RegExpObjectImpTable;
extern const HashTable regExpTable;
extern const HashTable regExpConstructorTable;
extern const HashTable stringTable;
......@@ -61,16 +61,16 @@ JSGlobalData::JSGlobalData()
, dateTable(new HashTable(KJS::dateTable))
, mathTable(new HashTable(KJS::mathTable))
, numberTable(new HashTable(KJS::numberTable))
, RegExpImpTable(new HashTable(KJS::RegExpImpTable))
, RegExpObjectImpTable(new HashTable(KJS::RegExpObjectImpTable))
, regExpTable(new HashTable(KJS::regExpTable))
, regExpConstructorTable(new HashTable(KJS::regExpConstructorTable))
, stringTable(new HashTable(KJS::stringTable))
#else
: arrayTable(&KJS::arrayTable)
, dateTable(&KJS::dateTable)
, mathTable(&KJS::mathTable)
, numberTable(&KJS::numberTable)
, RegExpImpTable(&KJS::RegExpImpTable)
, RegExpObjectImpTable(&KJS::RegExpObjectImpTable)
, regExpTable(&KJS::regExpTable)
, regExpConstructorTable(&KJS::regExpConstructorTable)
, stringTable(&KJS::stringTable)
#endif
, identifierTable(createIdentifierTable())
......@@ -88,15 +88,15 @@ JSGlobalData::~JSGlobalData()
delete[] dateTable->table;
delete[] mathTable->table;
delete[] numberTable->table;
delete[] RegExpImpTable->table;
delete[] RegExpObjectImpTable->table;
delete[] regExpTable->table;
delete[] regExpConstructorTable->table;
delete[] stringTable->table;
delete arrayTable;
delete dateTable;
delete mathTable;
delete numberTable;
delete RegExpImpTable;
delete RegExpObjectImpTable;
delete regExpTable;
delete regExpConstructorTable;
delete stringTable;
delete parser;
......
......@@ -63,8 +63,8 @@ namespace KJS {
const HashTable* dateTable;
const HashTable* mathTable;
const HashTable* numberTable;
const HashTable* RegExpImpTable;
const HashTable* RegExpObjectImpTable;
const HashTable* regExpTable;
const HashTable* regExpConstructorTable;
const HashTable* stringTable;
IdentifierTable* identifierTable;
......
......@@ -254,22 +254,22 @@ void JSGlobalObject::reset(JSValue* prototype)
d()->URIErrorPrototype = new NativeErrorPrototype(exec, d()->errorPrototype, "URIError", "URIError");
// Constructors
d()->objectConstructor = new ObjectObjectImp(exec, d()->objectPrototype, d()->functionPrototype);
d()->functionConstructor = new FunctionObjectImp(exec, d()->functionPrototype);
d()->arrayConstructor = new ArrayObjectImp(exec, d()->functionPrototype, d()->arrayPrototype);
d()->stringConstructor = new StringObjectImp(exec, d()->functionPrototype, d()->stringPrototype);
d()->booleanConstructor = new BooleanObjectImp(exec, d()->functionPrototype, d()->booleanPrototype);
d()->numberConstructor = new NumberObjectImp(exec, d()->functionPrototype, d()->numberPrototype);
d()->dateConstructor = new DateObjectImp(exec, d()->functionPrototype, d()->datePrototype);
d()->regExpConstructor = new RegExpObjectImp(exec, d()->functionPrototype, d()->regExpPrototype);
d()->errorConstructor = new ErrorObjectImp(exec, d()->functionPrototype, d()->errorPrototype);
d()->objectConstructor = new ObjectConstructor(exec, d()->objectPrototype, d()->functionPrototype);
d()->functionConstructor = new FunctionConstructor(exec, d()->functionPrototype);
d()->arrayConstructor = new ArrayConstructor(exec, d()->functionPrototype, d()->arrayPrototype);
d()->stringConstructor = new StringConstructor(exec, d()->functionPrototype, d()->stringPrototype);
d()->booleanConstructor = new BooleanConstructor(exec, d()->functionPrototype, d()->booleanPrototype);
d()->numberConstructor = new NumberConstructor(exec, d()->functionPrototype, d()->numberPrototype);
d()->dateConstructor = new DateConstructor(exec, d()->functionPrototype, d()->datePrototype);
d()->regExpConstructor = new RegExpConstructor(exec, d()->functionPrototype, d()->regExpPrototype);
d()->errorConstructor = new ErrorConstructor(exec, d()->functionPrototype, d()->errorPrototype);
d()->evalErrorConstructor = new NativeErrorImp(exec, d()->functionPrototype, d()->evalErrorPrototype);
d()->rangeErrorConstructor = new NativeErrorImp(exec, d()->functionPrototype, d()->rangeErrorPrototype);
d()->referenceErrorConstructor = new NativeErrorImp(exec, d()->functionPrototype, d()->referenceErrorPrototype);
d()->syntaxErrorConstructor = new NativeErrorImp(exec, d()->functionPrototype, d()->syntaxErrorPrototype);
d()->typeErrorConstructor = new NativeErrorImp(exec, d()->functionPrototype, d()->typeErrorPrototype);
d()->URIErrorConstructor = new NativeErrorImp(exec, d()->functionPrototype, d()->URIErrorPrototype);
d()->evalErrorConstructor = new NativeErrorConstructor(exec, d()->functionPrototype, d()->evalErrorPrototype);
d()->rangeErrorConstructor = new NativeErrorConstructor(exec, d()->functionPrototype, d()->rangeErrorPrototype);
d()->referenceErrorConstructor = new NativeErrorConstructor(exec, d()->functionPrototype, d()->referenceErrorPrototype);
d()->syntaxErrorConstructor = new NativeErrorConstructor(exec, d()->functionPrototype, d()->syntaxErrorPrototype);
d()->typeErrorConstructor = new NativeErrorConstructor(exec, d()->functionPrototype, d()->typeErrorPrototype);
d()->URIErrorConstructor = new NativeErrorConstructor(exec, d()->functionPrototype, d()->URIErrorPrototype);
d()->functionPrototype->putDirect(exec->propertyNames().constructor, d()->functionConstructor, DontEnum);
......@@ -311,7 +311,7 @@ void JSGlobalObject::reset(JSValue* prototype)
// Set global values.
GlobalPropertyInfo staticGlobals[] = {
GlobalPropertyInfo("Math", new MathObjectImp(exec, d()->objectPrototype), DontEnum | DontDelete),
GlobalPropertyInfo("Math", new MathObject(exec, d()->objectPrototype), DontEnum | DontDelete),
GlobalPropertyInfo("NaN", jsNaN(), DontEnum | DontDelete),
GlobalPropertyInfo("Infinity", jsNumber(Inf), DontEnum | DontDelete),
GlobalPropertyInfo("undefined", jsUndefined(), DontEnum | DontDelete)
......
......@@ -32,26 +32,26 @@
namespace KJS {
class ArrayObjectImp;
class ArrayConstructor;
class ArrayPrototype;
class BooleanObjectImp;
class BooleanConstructor;
class BooleanPrototype;
class DateObjectImp;
class DateConstructor;
class DatePrototype;
class Debugger;
class ErrorObjectImp;
class ErrorConstructor;
class ErrorPrototype;
class EvalError;
class EvalErrorPrototype;
class FunctionObjectImp;
class FunctionConstructor;
class FunctionPrototype;
struct HashTable;
class JSGlobalObject;
class NativeErrorImp;
class NativeErrorConstructor;
class NativeErrorPrototype;
class NumberObjectImp;
class NumberConstructor;
class NumberPrototype;
class ObjectObjectImp;
class ObjectConstructor;
class ObjectPrototype;
class ProgramCodeBlock;
class PrototypeReflexiveFunction;
......@@ -60,11 +60,11 @@ namespace KJS {
class ReferenceError;
class ReferenceError;
class ReferenceErrorPrototype;
class RegExpObjectImp;
class RegExpConstructor;
class RegExpPrototype;
class RuntimeMethod;
class ScopeChain;
class StringObjectImp;
class StringConstructor;
class StringPrototype;
class SyntaxErrorPrototype;
class TypeError;
......@@ -104,21 +104,21 @@ namespace KJS {
unsigned tickCount;
unsigned ticksUntilNextTimeoutCheck;
ObjectObjectImp* objectConstructor;
FunctionObjectImp* functionConstructor;
ArrayObjectImp* arrayConstructor;
BooleanObjectImp* booleanConstructor;
StringObjectImp* stringConstructor;
NumberObjectImp* numberConstructor;
DateObjectImp* dateConstructor;
RegExpObjectImp* regExpConstructor;
ErrorObjectImp* errorConstructor;
NativeErrorImp* evalErrorConstructor;
NativeErrorImp* rangeErrorConstructor;
NativeErrorImp* referenceErrorConstructor;
NativeErrorImp* syntaxErrorConstructor;
NativeErrorImp* typeErrorConstructor;
NativeErrorImp* URIErrorConstructor;
ObjectConstructor* objectConstructor;
FunctionConstructor* functionConstructor;
ArrayConstructor* arrayConstructor;
BooleanConstructor* booleanConstructor;
StringConstructor* stringConstructor;
NumberConstructor* numberConstructor;
DateConstructor* dateConstructor;
RegExpConstructor* regExpConstructor;
ErrorConstructor* errorConstructor;
NativeErrorConstructor* evalErrorConstructor;
NativeErrorConstructor* rangeErrorConstructor;
NativeErrorConstructor* referenceErrorConstructor;
NativeErrorConstructor* syntaxErrorConstructor;
NativeErrorConstructor* typeErrorConstructor;
NativeErrorConstructor* URIErrorConstructor;
PrototypeReflexiveFunction* evalFunction;
......@@ -187,21 +187,21 @@ namespace KJS {
// The following accessors return pristine values, even if a script
// replaces the global object's associated property.
ObjectObjectImp* objectConstructor() const { return d()->objectConstructor; }
FunctionObjectImp* functionConstructor() const { return d()->functionConstructor; }
ArrayObjectImp* arrayConstructor() const { return d()->arrayConstructor; }
BooleanObjectImp* booleanConstructor() const { return d()->booleanConstructor; }
StringObjectImp* stringConstructor() const{ return d()->stringConstructor; }
NumberObjectImp* numberConstructor() const{ return d()->numberConstructor; }
DateObjectImp* dateConstructor() const{ return d()->dateConstructor; }
RegExpObjectImp* regExpConstructor() const { return d()->regExpConstructor; }
ErrorObjectImp* errorConstructor() const { return d()->errorConstructor; }
NativeErrorImp* evalErrorConstructor() const { return d()->evalErrorConstructor; }
NativeErrorImp* rangeErrorConstructor() const { return d()->rangeErrorConstructor; }
NativeErrorImp* referenceErrorConstructor() const { return d()->referenceErrorConstructor; }
NativeErrorImp* syntaxErrorConstructor() const { return d()->syntaxErrorConstructor; }
NativeErrorImp* typeErrorConstructor() const { return d()->typeErrorConstructor; }
NativeErrorImp* URIErrorConstructor() const { return d()->URIErrorConstructor; }
ObjectConstructor* objectConstructor() const { return d()->objectConstructor; }
FunctionConstructor* functionConstructor() const { return d()->functionConstructor; }
ArrayConstructor* arrayConstructor() const { return d()->arrayConstructor; }
BooleanConstructor* booleanConstructor() const { return d()->booleanConstructor; }
StringConstructor* stringConstructor() const{ return d()->stringConstructor; }
NumberConstructor* numberConstructor() const{ return d()->numberConstructor; }
DateConstructor* dateConstructor() const{ return d()->dateConstructor; }
RegExpConstructor* regExpConstructor() const { return d()->regExpConstructor; }
ErrorConstructor* errorConstructor() const { return d()->errorConstructor; }
NativeErrorConstructor* evalErrorConstructor() const { return d()->evalErrorConstructor; }
NativeErrorConstructor* rangeErrorConstructor() const { return d()->rangeErrorConstructor; }
NativeErrorConstructor* referenceErrorConstructor() const { return d()->referenceErrorConstructor; }
NativeErrorConstructor* syntaxErrorConstructor() const { return d()->syntaxErrorConstructor; }
NativeErrorConstructor* typeErrorConstructor() const { return d()->typeErrorConstructor; }
NativeErrorConstructor* URIErrorConstructor() const { return d()->URIErrorConstructor; }
PrototypeReflexiveFunction* evalFunction() const { return d()->evalFunction; }
......
......@@ -723,10 +723,10 @@ JSValue* arrayProtoFuncLastIndexOf(ExecState* exec, JSObject* thisObj, const Lis
return jsNumber(-1);
}
// ------------------------------ ArrayObjectImp -------------------------------
// ------------------------------ ArrayConstructor -------------------------------
ArrayObjectImp::ArrayObjectImp(ExecState* exec, FunctionPrototype* funcProto, ArrayPrototype* arrayProto)
: InternalFunctionImp(funcProto, arrayProto->classInfo()->className)
ArrayConstructor::ArrayConstructor(ExecState* exec, FunctionPrototype* funcProto, ArrayPrototype* arrayProto)
: InternalFunction(funcProto, arrayProto->classInfo()->className)
{
// ECMA 15.4.3.1 Array.prototype
putDirect(exec->propertyNames().prototype, arrayProto, DontEnum|DontDelete|ReadOnly);
......@@ -735,13 +735,13 @@ ArrayObjectImp::ArrayObjectImp(ExecState* exec, FunctionPrototype* funcProto, Ar
putDirect(exec->propertyNames().length, jsNumber(1), ReadOnly|DontDelete|DontEnum);
}
ConstructType ArrayObjectImp::getConstructData(ConstructData&)
ConstructType ArrayConstructor::getConstructData(ConstructData&)
{
return ConstructTypeNative;
}
// ECMA 15.4.2
JSObject* ArrayObjectImp::construct(ExecState* exec, const List& args)
JSObject* ArrayConstructor::construct(ExecState* exec, const List& args)
{
// a single numeric argument denotes the array size (!)
if (args.size() == 1 && args[0]->isNumber()) {
......@@ -756,7 +756,7 @@ JSObject* ArrayObjectImp::construct(ExecState* exec, const List& args)
}
// ECMA 15.6.1
JSValue* ArrayObjectImp::callAsFunction(ExecState* exec, JSObject*, const List& args)
JSValue* ArrayConstructor::callAsFunction(ExecState* exec, JSObject*, const List& args)
{
// equivalent to 'new Array(....)'
return construct(exec,args);
......
......@@ -36,9 +36,9 @@ namespace KJS {
static const ClassInfo info;
};
class ArrayObjectImp : public InternalFunctionImp {
class ArrayConstructor : public InternalFunction {
public:
ArrayObjectImp(ExecState*, FunctionPrototype*, ArrayPrototype*);
ArrayConstructor(ExecState*, FunctionPrototype*, ArrayPrototype*);
virtual ConstructType getConstructData(ConstructData&);
virtual JSObject* construct(ExecState*, const List&);
......
......@@ -28,11 +28,11 @@
namespace KJS {
// ------------------------------ BooleanInstance ---------------------------
// ------------------------------ BooleanObject ---------------------------
const ClassInfo BooleanInstance::info = { "Boolean", 0, 0, 0 };
const ClassInfo BooleanObject::info = { "Boolean", 0, 0, 0 };
BooleanInstance::BooleanInstance(JSObject* proto)
BooleanObject::BooleanObject(JSObject* proto)
: JSWrapperObject(proto)
{
}
......@@ -46,7 +46,7 @@ static JSValue* booleanProtoFuncValueOf(ExecState*, JSObject*, const List&);
// ECMA 15.6.4
BooleanPrototype::BooleanPrototype(ExecState* exec, ObjectPrototype* objectPrototype, FunctionPrototype* functionPrototype)
: BooleanInstance(objectPrototype)
: BooleanObject(objectPrototype)
{
setInternalValue(jsBoolean(false));
......@@ -61,31 +61,31 @@ BooleanPrototype::BooleanPrototype(ExecState* exec, ObjectPrototype* objectProto
JSValue* booleanProtoFuncToString(ExecState* exec, JSObject* thisObj, const List&)
{
if (!thisObj->inherits(&BooleanInstance::info))
if (!thisObj->inherits(&BooleanObject::info))
return throwError(exec, TypeError);
JSValue* v = static_cast<BooleanInstance*>(thisObj)->internalValue();
JSValue* v = static_cast<BooleanObject*>(thisObj)->internalValue();
ASSERT(v);
return jsString(v->toString(exec));
}
JSValue* booleanProtoFuncValueOf(ExecState* exec, JSObject* thisObj, const List&)
{
if (!thisObj->inherits(&BooleanInstance::info))
if (!thisObj->inherits(&BooleanObject::info))
return throwError(exec, TypeError);
JSValue* v = static_cast<BooleanInstance*>(thisObj)->internalValue();
JSValue* v = static_cast<BooleanObject*>(thisObj)->internalValue();
ASSERT(v);
// TODO: optimize for bool case
return jsBoolean(v->toBoolean(exec));
}
// ------------------------------ BooleanObjectImp -----------------------------
// ------------------------------ BooleanConstructor -----------------------------
BooleanObjectImp::BooleanObjectImp(ExecState* exec, FunctionPrototype* functionPrototype, BooleanPrototype* booleanPrototype)
: InternalFunctionImp(functionPrototype, booleanPrototype->classInfo()->className)
BooleanConstructor::BooleanConstructor(ExecState* exec, FunctionPrototype* functionPrototype, BooleanPrototype* booleanPrototype)
: InternalFunction(functionPrototype, booleanPrototype->classInfo()->className)
{
putDirect(exec->propertyNames().prototype, booleanPrototype, DontEnum | DontDelete | ReadOnly);
......@@ -93,21 +93,21 @@ BooleanObjectImp::BooleanObjectImp(ExecState* exec, FunctionPrototype* functionP
putDirect(exec->propertyNames().length, jsNumber(1), ReadOnly | DontDelete | DontEnum);
}
ConstructType BooleanObjectImp::getConstructData(ConstructData&)
ConstructType BooleanConstructor::getConstructData(ConstructData&)
{
return ConstructTypeNative;
}
// ECMA 15.6.2
JSObject* BooleanObjectImp::construct(ExecState* exec, const List& args)
JSObject* BooleanConstructor::construct(ExecState* exec, const List& args)
{
BooleanInstance* obj(new BooleanInstance(exec->lexicalGlobalObject()->booleanPrototype()));
BooleanObject* obj(new BooleanObject(exec->lexicalGlobalObject()->booleanPrototype()));
obj->setInternalValue(jsBoolean(args[0]->toBoolean(exec)));
return obj;
}
// ECMA 15.6.1
JSValue* BooleanObjectImp::callAsFunction(ExecState* exec, JSObject*, const List& args)
JSValue* BooleanConstructor::callAsFunction(ExecState* exec, JSObject*, const List& args)
{
// TODO: optimize for bool case
return jsBoolean(args[0]->toBoolean(exec));
......
......@@ -26,9 +26,9 @@
namespace KJS {
class BooleanInstance : public JSWrapperObject {
class BooleanObject : public JSWrapperObject {
public:
BooleanInstance(JSObject* proto);
BooleanObject(JSObject* proto);
virtual const ClassInfo* classInfo() const { return &info; }
static const ClassInfo info;
......@@ -40,7 +40,7 @@ namespace KJS {
* The initial value of Boolean.prototype (and thus all objects created
* with the Boolean constructor
*/
class BooleanPrototype : public BooleanInstance {
class BooleanPrototype : public BooleanObject {
public:
BooleanPrototype(ExecState*, ObjectPrototype*, FunctionPrototype*);
};
......@@ -50,9 +50,9 @@ namespace KJS {
*
* The initial value of the the global variable's "Boolean" property
*/
class BooleanObjectImp : public InternalFunctionImp {
class BooleanConstructor : public InternalFunction {
public:
BooleanObjectImp(ExecState*, FunctionPrototype*, BooleanPrototype*);
BooleanConstructor(ExecState*, FunctionPrototype*, BooleanPrototype*);
virtual ConstructType getConstructData(ConstructData&);
virtual JSObject* construct(ExecState*, const List&);
......
......@@ -82,9 +82,9 @@ inline int gmtoffset(const GregorianDateTime& t)
* Class to implement all methods that are properties of the
* Date object
*/
class DateObjectFuncImp : public InternalFunctionImp {
class DateFunction : public InternalFunction {
public:
DateObjectFuncImp(ExecState *, FunctionPrototype *, int i, int len, const Identifier& );
DateFunction(ExecState *, FunctionPrototype *, int i, int len, const Identifier& );
virtual JSValue *callAsFunction(ExecState *, JSObject *thisObj, const List &args);
......@@ -473,7 +473,7 @@ DatePrototype::DatePrototype(ExecState *, ObjectPrototype *objectProto)
: DateInstance(objectProto)
{
setInternalValue(jsNaN());
// The constructor will be added later, after DateObjectImp has been built.
// The constructor will be added later, after DateConstructor has been built.
}
bool DatePrototype::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
......@@ -481,27 +481,27 @@ bool DatePrototype::getOwnPropertySlot(ExecState* exec, const Identifier& proper
return getStaticFunctionSlot<JSObject>(exec, ExecState::dateTable(exec), this, propertyName, slot);
}
// ------------------------------ DateObjectImp --------------------------------
// ------------------------------ DateConstructor --------------------------------
// TODO: MakeTime (15.9.11.1) etc. ?
DateObjectImp::DateObjectImp(ExecState* exec, FunctionPrototype* funcProto, DatePrototype* dateProto)
: InternalFunctionImp(funcProto, dateProto->classInfo()->className)
DateConstructor::DateConstructor(ExecState* exec, FunctionPrototype* funcProto, DatePrototype* dateProto)
: InternalFunction(funcProto, dateProto->classInfo()->className)
{
putDirect(exec->propertyNames().prototype, dateProto, DontEnum|DontDelete|ReadOnly);
putDirectFunction(new DateObjectFuncImp(exec, funcProto, DateObjectFuncImp::Parse, 1, exec->propertyNames().parse), DontEnum);
putDirectFunction(new DateObjectFuncImp(exec, funcProto, DateObjectFuncImp::UTC, 7, exec->propertyNames().UTC), DontEnum);
putDirectFunction(new DateObjectFuncImp(exec, funcProto, DateObjectFuncImp::Now, 0, exec->propertyNames().now), DontEnum);
putDirectFunction(new DateFunction(exec, funcProto, DateFunction::Parse, 1, exec->propertyNames().parse), DontEnum);
putDirectFunction(new DateFunction(exec, funcProto, DateFunction::UTC, 7, exec->propertyNames().UTC), DontEnum);
putDirectFunction(new DateFunction(exec, funcProto, DateFunction::Now, 0, exec->propertyNames().now), DontEnum);
putDirect(exec->propertyNames().length, 7, ReadOnly|DontDelete|DontEnum);
}
ConstructType DateObjectImp::getConstructData(ConstructData&)
ConstructType DateConstructor::getConstructData(ConstructData&)
{
return ConstructTypeNative;
}
// ECMA 15.9.3
JSObject *DateObjectImp::construct(ExecState *exec, const List &args)
JSObject *DateConstructor::construct(ExecState *exec, const List &args)
{