Ignore:
Timestamp:
Jun 15, 2008, 7:19:08 PM (17 years ago)
Author:
Darin Adler
Message:

JavaScriptCore:

2008-06-15 Darin Adler <Darin Adler>

Rubber stamped by Sam.

  • use JS prefix and simpler names for basic JavaScriptCore types, to complement JSValue and JSObject
  • JavaScriptCore.exp:
  • VM/Machine.cpp: (KJS::jsLess): (KJS::jsLessEq): (KJS::jsAdd): (KJS::callEval): (KJS::Machine::execute): (KJS::Machine::retrieveArguments): (KJS::Machine::retrieveCaller): (KJS::Machine::getCallFrame): (KJS::Machine::getFunctionAndArguments):
  • VM/Machine.h:
  • VM/Register.h:
  • kjs/DebuggerCallFrame.cpp: (KJS::DebuggerCallFrame::functionName):
  • kjs/ExecState.h:
  • kjs/JSActivation.cpp: (KJS::JSActivation::createArgumentsObject):
  • kjs/array_instance.cpp: (KJS::): (KJS::JSArray::checkConsistency): (KJS::JSArray::JSArray): (KJS::JSArray::~JSArray): (KJS::JSArray::getItem): (KJS::JSArray::lengthGetter): (KJS::JSArray::inlineGetOwnPropertySlot): (KJS::JSArray::getOwnPropertySlot): (KJS::JSArray::put): (KJS::JSArray::deleteProperty): (KJS::JSArray::getPropertyNames): (KJS::JSArray::increaseVectorLength): (KJS::JSArray::setLength): (KJS::JSArray::mark): (KJS::JSArray::sort): (KJS::JSArray::compactForSorting): (KJS::JSArray::lazyCreationData): (KJS::JSArray::setLazyCreationData):
  • kjs/array_instance.h:
  • kjs/array_object.cpp: (KJS::): (KJS::ArrayPrototype::ArrayPrototype): (KJS::ArrayPrototype::getOwnPropertySlot): (KJS::arrayProtoFuncToString): (KJS::arrayProtoFuncToLocaleString): (KJS::arrayProtoFuncConcat): (KJS::arrayProtoFuncSort): (KJS::ArrayObjectImp::construct):
  • kjs/array_object.h:
  • kjs/completion.h:
  • kjs/function.cpp: (KJS::): (KJS::JSFunction::JSFunction): (KJS::JSFunction::mark): (KJS::JSFunction::getCallData): (KJS::JSFunction::callAsFunction): (KJS::JSFunction::argumentsGetter): (KJS::JSFunction::callerGetter): (KJS::JSFunction::lengthGetter): (KJS::JSFunction::getOwnPropertySlot): (KJS::JSFunction::put): (KJS::JSFunction::deleteProperty): (KJS::JSFunction::getParameterName): (KJS::JSFunction::getConstructData): (KJS::JSFunction::construct): (KJS::IndexToNameMap::IndexToNameMap): (KJS::Arguments::Arguments):
  • kjs/function.h:
  • kjs/function_object.cpp: (KJS::functionProtoFuncToString): (KJS::functionProtoFuncApply): (KJS::FunctionObjectImp::construct):
  • kjs/internal.cpp: (KJS::JSString::toPrimitive): (KJS::JSString::getPrimitiveNumber): (KJS::JSString::toBoolean): (KJS::JSString::toNumber): (KJS::JSString::toString): (KJS::StringInstance::create): (KJS::JSString::toObject): (KJS::JSString::toThisObject): (KJS::JSString::lengthGetter): (KJS::JSString::indexGetter): (KJS::JSString::indexNumericPropertyGetter): (KJS::JSString::getOwnPropertySlot): (KJS::JSNumberCell::type): (KJS::JSNumberCell::toPrimitive): (KJS::JSNumberCell::getPrimitiveNumber): (KJS::JSNumberCell::toBoolean): (KJS::JSNumberCell::toNumber): (KJS::JSNumberCell::toString): (KJS::JSNumberCell::toObject): (KJS::JSNumberCell::toThisObject): (KJS::JSNumberCell::getUInt32): (KJS::JSNumberCell::getTruncatedInt32): (KJS::JSNumberCell::getTruncatedUInt32): (KJS::GetterSetter::mark): (KJS::GetterSetter::toPrimitive): (KJS::GetterSetter::getPrimitiveNumber): (KJS::GetterSetter::toBoolean): (KJS::GetterSetter::toNumber): (KJS::GetterSetter::toString): (KJS::GetterSetter::toObject): (KJS::GetterSetter::getOwnPropertySlot): (KJS::GetterSetter::put): (KJS::GetterSetter::toThisObject):
  • kjs/internal.h: (KJS::JSString::JSString): (KJS::JSString::getStringPropertySlot):
  • kjs/nodes.cpp: (KJS::FuncDeclNode::makeFunction): (KJS::FuncExprNode::makeFunction):
  • kjs/nodes.h:
  • kjs/object.cpp: (KJS::JSObject::put): (KJS::JSObject::deleteProperty): (KJS::JSObject::defineGetter): (KJS::JSObject::defineSetter): (KJS::JSObject::lookupGetter): (KJS::JSObject::lookupSetter): (KJS::JSObject::fillGetterPropertySlot):
  • kjs/object.h: (KJS::): (KJS::GetterSetter::GetterSetter):
  • kjs/operations.cpp: (KJS::equal): (KJS::strictEqual):
  • kjs/property_map.cpp: (KJS::PropertyMap::containsGettersOrSetters):
  • kjs/regexp_object.cpp: (KJS::RegExpMatchesArray::getOwnPropertySlot): (KJS::RegExpMatchesArray::put): (KJS::RegExpMatchesArray::deleteProperty): (KJS::RegExpMatchesArray::getPropertyNames): (KJS::RegExpMatchesArray::RegExpMatchesArray): (KJS::RegExpMatchesArray::fillArrayInstance):
  • kjs/string_object.cpp: (KJS::StringInstance::StringInstance): (KJS::replace): (KJS::stringProtoFuncReplace): (KJS::stringProtoFuncToLowerCase): (KJS::stringProtoFuncToUpperCase): (KJS::stringProtoFuncToLocaleLowerCase): (KJS::stringProtoFuncToLocaleUpperCase):
  • kjs/string_object.h: (KJS::StringInstance::internalValue):
  • kjs/value.cpp: (KJS::JSCell::getNumber): (KJS::JSCell::getString): (KJS::JSCell::getObject): (KJS::jsString): (KJS::jsOwnedString):
  • kjs/value.h: (KJS::JSNumberCell::JSNumberCell): (KJS::jsNumberCell): (KJS::JSValue::uncheckedGetNumber):
  • profiler/Profiler.cpp: (KJS::createCallIdentifier): (KJS::createCallIdentifierFromFunctionImp):

WebCore:

2008-06-15 Darin Adler <Darin Adler>

Rubber stamped by Sam.

  • use JS prefix and simpler names for basic JavaScriptCore types, to complement JSValue and JSObject
  • bindings/js/JSNavigatorCustom.cpp: (WebCore::needsYouTubeQuirk):
  • bindings/js/kjs_events.cpp: (WebCore::JSLazyEventListener::parseCode):
  • bridge/jni/jni_utility.cpp: (KJS::Bindings::convertArrayInstanceToJavaArray): (KJS::Bindings::convertValueToJValue):
  • bridge/qt/qt_runtime.cpp: (KJS::Bindings::valueRealType): (KJS::Bindings::convertValueToQVariant): (KJS::Bindings::QtConnectionObject::execute):
  • bridge/runtime_array.cpp:

WebKit/mac:

2008-06-15 Darin Adler <Darin Adler>

Rubber stamped by Sam.

  • use JS prefix and simpler names for basic JavaScriptCore types, to complement JSValue and JSObject
  • WebView/WebView.mm: (aeDescFromJSValue):

WebKit/win:

2008-06-15 Darin Adler <Darin Adler>

Rubber stamped by Sam.

  • use JS prefix and simpler names for basic JavaScriptCore types, to complement JSValue and JSObject
  • WebScriptCallFrame.cpp: (WebScriptCallFrame::functionName):

WebKitTools:

2008-06-15 Darin Adler <Darin Adler>

  • Scripts/do-webcore-rename: Updated for the latest round of renaming.
File:
1 edited

Legend:

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

    r34412 r34578  
    5656namespace KJS {
    5757
    58 // ----------------------------- FunctionImp ----------------------------------
    59 
    60 const ClassInfo FunctionImp::info = { "Function", &InternalFunctionImp::info, 0, 0 };
    61 
    62 FunctionImp::FunctionImp(ExecState* exec, const Identifier& name, FunctionBodyNode* b, ScopeChainNode* scopeChain)
     58// ----------------------------- JSFunction ----------------------------------
     59
     60const ClassInfo JSFunction::info = { "Function", &InternalFunctionImp::info, 0, 0 };
     61
     62JSFunction::JSFunction(ExecState* exec, const Identifier& name, FunctionBodyNode* b, ScopeChainNode* scopeChain)
    6363  : InternalFunctionImp(exec->lexicalGlobalObject()->functionPrototype(), name)
    6464  , body(b)
     
    6767}
    6868
    69 void FunctionImp::mark()
     69void JSFunction::mark()
    7070{
    7171    InternalFunctionImp::mark();
     
    7474}
    7575
    76 CallType FunctionImp::getCallData(CallData& callData)
     76CallType JSFunction::getCallData(CallData& callData)
    7777{
    7878    callData.js.functionBody = body.get();
     
    8181}
    8282
    83 JSValue* FunctionImp::callAsFunction(ExecState* exec, JSObject* thisObj, const List& args)
     83JSValue* JSFunction::callAsFunction(ExecState* exec, JSObject* thisObj, const List& args)
    8484{
    8585    JSValue* exception = 0;
     
    100100}
    101101
    102 JSValue* FunctionImp::argumentsGetter(ExecState* exec, const Identifier&, const PropertySlot& slot)
    103 {
    104     FunctionImp* thisObj = static_cast<FunctionImp*>(slot.slotBase());
     102JSValue* JSFunction::argumentsGetter(ExecState* exec, const Identifier&, const PropertySlot& slot)
     103{
     104    JSFunction* thisObj = static_cast<JSFunction*>(slot.slotBase());
    105105    ASSERT(exec->machine());
    106106    return exec->machine()->retrieveArguments(exec, thisObj);
    107107}
    108108
    109 JSValue* FunctionImp::callerGetter(ExecState* exec, const Identifier&, const PropertySlot& slot)
    110 {
    111     FunctionImp* thisObj = static_cast<FunctionImp*>(slot.slotBase());
     109JSValue* JSFunction::callerGetter(ExecState* exec, const Identifier&, const PropertySlot& slot)
     110{
     111    JSFunction* thisObj = static_cast<JSFunction*>(slot.slotBase());
    112112    ASSERT(exec->machine());
    113113    return exec->machine()->retrieveCaller(exec, thisObj);
    114114}
    115115
    116 JSValue* FunctionImp::lengthGetter(ExecState*, const Identifier&, const PropertySlot& slot)
    117 {
    118     FunctionImp* thisObj = static_cast<FunctionImp*>(slot.slotBase());
     116JSValue* JSFunction::lengthGetter(ExecState*, const Identifier&, const PropertySlot& slot)
     117{
     118    JSFunction* thisObj = static_cast<JSFunction*>(slot.slotBase());
    119119    return jsNumber(thisObj->body->parameters().size());
    120120}
    121121
    122 bool FunctionImp::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
     122bool JSFunction::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
    123123{
    124124    if (propertyName == exec->propertyNames().arguments) {
     
    140140}
    141141
    142 void FunctionImp::put(ExecState* exec, const Identifier& propertyName, JSValue* value)
     142void JSFunction::put(ExecState* exec, const Identifier& propertyName, JSValue* value)
    143143{
    144144    if (propertyName == exec->propertyNames().arguments || propertyName == exec->propertyNames().length)
     
    147147}
    148148
    149 bool FunctionImp::deleteProperty(ExecState* exec, const Identifier& propertyName)
     149bool JSFunction::deleteProperty(ExecState* exec, const Identifier& propertyName)
    150150{
    151151    if (propertyName == exec->propertyNames().arguments || propertyName == exec->propertyNames().length)
     
    161161 * function f2(x, x): getParameterName(0) --> null
    162162 */
    163 Identifier FunctionImp::getParameterName(int index)
     163Identifier JSFunction::getParameterName(int index)
    164164{
    165165    Vector<Identifier>& parameters = body->parameters();
     
    180180
    181181// ECMA 13.2.2 [[Construct]]
    182 ConstructType FunctionImp::getConstructData(ConstructData& constructData)
     182ConstructType JSFunction::getConstructData(ConstructData& constructData)
    183183{
    184184    constructData.js.functionBody = body.get();
     
    187187}
    188188
    189 JSObject* FunctionImp::construct(ExecState* exec, const List& args)
     189JSObject* JSFunction::construct(ExecState* exec, const List& args)
    190190{
    191191    JSObject* proto;
     
    221221// isn't stored in the activation object.
    222222
    223 IndexToNameMap::IndexToNameMap(FunctionImp* func, const List& args)
     223IndexToNameMap::IndexToNameMap(JSFunction* func, const List& args)
    224224{
    225225  _map = new Identifier[args.size()];
     
    279279
    280280// ECMA 10.1.8
    281 Arguments::Arguments(ExecState* exec, FunctionImp* func, const List& args, JSActivation* act)
     281Arguments::Arguments(ExecState* exec, JSFunction* func, const List& args, JSActivation* act)
    282282    : JSObject(exec->lexicalGlobalObject()->objectPrototype())
    283283    , _activationObject(act)
Note: See TracChangeset for help on using the changeset viewer.