Ignore:
Timestamp:
Oct 8, 2011, 2:31:32 PM (14 years ago)
Author:
[email protected]
Message:

Add static version of JSCell::getOwnPropertySlot
https://bugs.webkit.org/show_bug.cgi?id=69593

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Added static version of getOwnPropertySlot to every class that overrides
JSCell::getOwnPropertySlot. The virtual versions now call the static versions.
This is the first step in de-virtualizing JSCell::getOwnPropertySlot.

(JSC::DebuggerActivation::getOwnPropertySlot):

  • debugger/DebuggerActivation.h:
  • runtime/Arguments.cpp:

(JSC::Arguments::getOwnPropertySlot):

  • runtime/Arguments.h:
  • runtime/ArrayConstructor.h:
  • runtime/ArrayPrototype.cpp:

(JSC::ArrayPrototype::getOwnPropertySlot):

  • runtime/ArrayPrototype.h:
  • runtime/BooleanPrototype.cpp:

(JSC::BooleanPrototype::getOwnPropertySlot):

  • runtime/BooleanPrototype.h:
  • runtime/DateConstructor.cpp:

(JSC::DateConstructor::getOwnPropertySlot):

  • runtime/DateConstructor.h:
  • runtime/DatePrototype.cpp:

(JSC::DatePrototype::getOwnPropertySlot):

  • runtime/DatePrototype.h:
  • runtime/ErrorPrototype.cpp:

(JSC::ErrorPrototype::getOwnPropertySlot):

  • runtime/ErrorPrototype.h:
  • runtime/JSActivation.cpp:

(JSC::JSActivation::getOwnPropertySlot):

  • runtime/JSActivation.h:
  • runtime/JSArray.cpp:

(JSC::JSArray::getOwnPropertySlot):

  • runtime/JSArray.h:
  • runtime/JSBoundFunction.cpp:

(JSC::JSBoundFunction::getOwnPropertySlot):

  • runtime/JSBoundFunction.h:
  • runtime/JSByteArray.cpp:

(JSC::JSByteArray::getOwnPropertySlot):

  • runtime/JSByteArray.h:
  • runtime/JSCell.cpp:

(JSC::JSCell::getOwnPropertySlot):

  • runtime/JSCell.h:
  • runtime/JSFunction.cpp:

(JSC::JSFunction::getOwnPropertySlot):

  • runtime/JSFunction.h:
  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::getOwnPropertySlot):

  • runtime/JSGlobalObject.h:
  • runtime/JSNotAnObject.cpp:

(JSC::JSNotAnObject::getOwnPropertySlot):

  • runtime/JSNotAnObject.h:
  • runtime/JSONObject.cpp:

(JSC::JSONObject::getOwnPropertySlot):

  • runtime/JSONObject.h:
  • runtime/JSObject.cpp:

(JSC::JSObject::getOwnPropertySlot):

  • runtime/JSObject.h:

(JSC::JSObject::getOwnPropertySlot):

  • runtime/JSStaticScopeObject.cpp:

(JSC::JSStaticScopeObject::getOwnPropertySlot):

  • runtime/JSStaticScopeObject.h:
  • runtime/JSString.cpp:

(JSC::JSString::getOwnPropertySlot):

  • runtime/JSString.h:
  • runtime/MathObject.cpp:

(JSC::MathObject::getOwnPropertySlot):

  • runtime/MathObject.h:
  • runtime/NumberConstructor.cpp:

(JSC::NumberConstructor::getOwnPropertySlot):

  • runtime/NumberConstructor.h:
  • runtime/NumberPrototype.cpp:

(JSC::NumberPrototype::getOwnPropertySlot):

  • runtime/NumberPrototype.h:
  • runtime/ObjectConstructor.cpp:

(JSC::ObjectConstructor::getOwnPropertySlot):

  • runtime/ObjectConstructor.h:
  • runtime/ObjectPrototype.cpp:

(JSC::ObjectPrototype::getOwnPropertySlot):

  • runtime/ObjectPrototype.h:
  • runtime/RegExpConstructor.cpp:

(JSC::RegExpConstructor::getOwnPropertySlot):

  • runtime/RegExpConstructor.h:
  • runtime/RegExpMatchesArray.h:

(JSC::RegExpMatchesArray::getOwnPropertySlot):

  • runtime/RegExpObject.cpp:

(JSC::RegExpObject::getOwnPropertySlot):

  • runtime/RegExpObject.h:
  • runtime/RegExpPrototype.cpp:

(JSC::RegExpPrototype::getOwnPropertySlot):

  • runtime/RegExpPrototype.h:
  • runtime/StringConstructor.cpp:

(JSC::StringConstructor::getOwnPropertySlot):

  • runtime/StringConstructor.h:
  • runtime/StringObject.cpp:

(JSC::StringObject::getOwnPropertySlot):

  • runtime/StringObject.h:
  • runtime/StringPrototype.cpp:

(JSC::StringPrototype::getOwnPropertySlot):

  • runtime/StringPrototype.h:

Source/JavaScriptGlue:

Added static version of getOwnPropertySlot to every class that overrides
JSCell::getOwnPropertySlot. The virtual versions now call the static versions.
This is the first step in de-virtualizing JSCell::getOwnPropertySlot.

  • UserObjectImp.cpp:

(UserObjectImp::getOwnPropertySlot):

  • UserObjectImp.h:

Source/WebCore:

No new tests.

Added static version of getOwnPropertySlot to every class that overrides
JSCell::getOwnPropertySlot. The virtual versions now call the static versions.
This is the first step in de-virtualizing JSCell::getOwnPropertySlot.

  • bindings/js/JSDOMWindowShell.cpp:

(WebCore::JSDOMWindowShell::getOwnPropertySlot):

  • bindings/js/JSDOMWindowShell.h:
  • bridge/objc/objc_runtime.h:
  • bridge/objc/objc_runtime.mm:

(JSC::Bindings::ObjcFallbackObjectImp::getOwnPropertySlot):

  • bridge/qt/qt_runtime.cpp:

(JSC::Bindings::QtRuntimeMetaMethod::getOwnPropertySlot):
(JSC::Bindings::QtRuntimeConnectionMethod::getOwnPropertySlot):

  • bridge/qt/qt_runtime.h:
  • bridge/runtime_array.cpp:

(JSC::RuntimeArray::getOwnPropertySlot):

  • bridge/runtime_array.h:
  • bridge/runtime_method.cpp:

(JSC::RuntimeMethod::getOwnPropertySlot):

  • bridge/runtime_method.h:
  • bridge/runtime_object.cpp:

(JSC::Bindings::RuntimeObject::getOwnPropertySlot):

  • bridge/runtime_object.h:

Source/WebKit2:

Added static version of getOwnPropertySlot to every class that overrides
JSCell::getOwnPropertySlot. The virtual versions now call the static versions.
This is the first step in de-virtualizing JSCell::getOwnPropertySlot.

  • WebProcess/Plugins/Netscape/JSNPObject.cpp:

(WebKit::JSNPObject::getOwnPropertySlot):

  • WebProcess/Plugins/Netscape/JSNPObject.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptGlue/UserObjectImp.cpp

    r97006 r97015  
    131131bool UserObjectImp::getOwnPropertySlot(ExecState *exec, const Identifier& propertyName, PropertySlot& slot)
    132132{
    133     if (!fJSUserObject)
     133    return getOwnPropertySlot(this, exec, propertyName, slot);
     134}
     135
     136bool UserObjectImp::getOwnPropertySlot(JSCell* cell, ExecState *exec, const Identifier& propertyName, PropertySlot& slot)
     137{
     138    UserObjectImp* thisObject = static_cast<UserObjectImp*>(cell);
     139    if (!thisObject->fJSUserObject)
    134140        return false;
    135141
    136142    CFStringRef cfPropName = IdentifierToCFString(propertyName);
    137     JSUserObject *jsResult = fJSUserObject->CopyProperty(cfPropName);
     143    JSUserObject* jsResult = thisObject->fJSUserObject->CopyProperty(cfPropName);
    138144    ReleaseCFType(cfPropName);
    139145    if (jsResult) {
    140         slot.setCustom(this, userObjectGetter);
     146        slot.setCustom(thisObject, userObjectGetter);
    141147        jsResult->Release();
    142148        return true;
    143149    } else {
    144         JSValue kjsValue = toPrimitive(exec);
     150        JSValue kjsValue = thisObject->toPrimitive(exec);
    145151        if (!kjsValue.isUndefinedOrNull()) {
    146152            JSObject* kjsObject = kjsValue.toObject(exec);
     
    149155        }
    150156    }
    151     return JSObject::getOwnPropertySlot(exec, propertyName, slot);
     157    return JSObject::getOwnPropertySlot(thisObject, exec, propertyName, slot);
    152158}
    153159
Note: See TracChangeset for help on using the changeset viewer.