Changeset 34578 in webkit for trunk/JavaScriptCore/VM/Machine.cpp


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/VM/Machine.cpp

    r34541 r34578  
    104104        return n1 < n2;
    105105
    106     return static_cast<const StringImp*>(p1)->value() < static_cast<const StringImp*>(p2)->value();
     106    return static_cast<const JSString*>(p1)->value() < static_cast<const JSString*>(p2)->value();
    107107}
    108108
     
    119119        return n1 <= n2;
    120120
    121     return !(static_cast<const StringImp*>(p2)->value() < static_cast<const StringImp*>(p1)->value());
     121    return !(static_cast<const JSString*>(p2)->value() < static_cast<const JSString*>(p1)->value());
    122122}
    123123
     
    156156        return jsNumber(v1->uncheckedGetNumber() + v2->uncheckedGetNumber());
    157157    if (bothTypes == ((StringType << 3) | StringType)) {
    158         UString value = static_cast<StringImp*>(v1)->value() + static_cast<StringImp*>(v2)->value();
     158        UString value = static_cast<JSString*>(v1)->value() + static_cast<JSString*>(v2)->value();
    159159        if (value.isNull())
    160160            return throwOutOfMemoryError(exec);
     
    450450    int errLine;
    451451    UString errMsg;
    452     RefPtr<EvalNode> evalNode = exec->parser()->parse<EvalNode>(exec, UString(), 1, UStringSourceProvider::create(static_cast<StringImp*>(program)->value()), &sourceId, &errLine, &errMsg);
     452    RefPtr<EvalNode> evalNode = exec->parser()->parse<EvalNode>(exec, UString(), 1, UStringSourceProvider::create(static_cast<JSString*>(program)->value()), &sourceId, &errLine, &errMsg);
    453453
    454454    if (!evalNode) {
     
    685685}
    686686
    687 JSValue* Machine::execute(FunctionBodyNode* functionBodyNode, ExecState* exec, FunctionImp* function, JSObject* thisObj, const List& args, RegisterFileStack* registerFileStack, ScopeChainNode* scopeChain, JSValue** exception)
     687JSValue* Machine::execute(FunctionBodyNode* functionBodyNode, ExecState* exec, JSFunction* function, JSObject* thisObj, const List& args, RegisterFileStack* registerFileStack, ScopeChainNode* scopeChain, JSValue** exception)
    688688{
    689689    if (m_reentryDepth >= MaxReentryDepth) {
     
    25392539}
    25402540
    2541 JSValue* Machine::retrieveArguments(ExecState* exec, FunctionImp* function) const
     2541JSValue* Machine::retrieveArguments(ExecState* exec, JSFunction* function) const
    25422542{
    25432543    Register** registerBase;
     
    25582558}
    25592559
    2560 JSValue* Machine::retrieveCaller(ExecState* exec, FunctionImp* function) const
     2560JSValue* Machine::retrieveCaller(ExecState* exec, JSFunction* function) const
    25612561{
    25622562    Register** registerBase;
     
    25752575}
    25762576
    2577 bool Machine::getCallFrame(ExecState* exec, FunctionImp* function, Register**& registerBase, int& callFrameOffset) const
     2577bool Machine::getCallFrame(ExecState* exec, JSFunction* function, Register**& registerBase, int& callFrameOffset) const
    25782578{
    25792579    callFrameOffset = exec->m_callFrameOffset;
     
    25972597}
    25982598
    2599 void Machine::getFunctionAndArguments(Register** registerBase, Register* callFrame, FunctionImp*& function, Register*& argv, int& argc)
    2600 {
    2601     function = static_cast<FunctionImp*>(callFrame[Callee].u.jsValue);
    2602     ASSERT(function->inherits(&FunctionImp::info));
     2599void Machine::getFunctionAndArguments(Register** registerBase, Register* callFrame, JSFunction*& function, Register*& argv, int& argc)
     2600{
     2601    function = static_cast<JSFunction*>(callFrame[Callee].u.jsValue);
     2602    ASSERT(function->inherits(&JSFunction::info));
    26032603
    26042604    argv = (*registerBase) + callFrame[CallerRegisterOffset].u.i + callFrame[ArgumentStartRegister].u.i + 1; // skip "this"
Note: See TracChangeset for help on using the changeset viewer.