Ignore:
Timestamp:
Mar 2, 2016, 6:04:49 PM (9 years ago)
Author:
[email protected]
Message:

clean up JSObject::isExtensibleInline and JSObject::setPrototypeOfInline, and rename setPrototypeOf to setPrototype
https://bugs.webkit.org/show_bug.cgi?id=154942

Reviewed by Benjamin Poulain.

These don't need to be inlined in the way they are.
Doing dynamic dispatch is ok performance wise until
we have evidence stating otherwise.

  • API/JSObjectRef.cpp:

(JSObjectSetPrototype):
(JSObjectHasProperty):

  • runtime/ClassInfo.h:
  • runtime/IntlCollatorConstructor.cpp:

(JSC::constructIntlCollator):

  • runtime/IntlDateTimeFormatConstructor.cpp:

(JSC::constructIntlDateTimeFormat):

  • runtime/IntlNumberFormatConstructor.cpp:

(JSC::constructIntlNumberFormat):

  • runtime/JSCell.cpp:

(JSC::JSCell::isExtensible):
(JSC::JSCell::setPrototype):
(JSC::JSCell::setPrototypeOf): Deleted.

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

(JSC::globalFuncProtoSetter):

  • runtime/JSObject.cpp:

(JSC::JSObject::setPrototypeWithCycleCheck):
(JSC::JSObject::setPrototype):
(JSC::JSObject::allowsAccessFrom):
(JSC::JSObject::isExtensible):
(JSC::JSObject::reifyAllStaticProperties):
(JSC::JSObject::defineOwnNonIndexProperty):
(JSC::JSObject::setPrototypeOf): Deleted.

  • runtime/JSObject.h:

(JSC::JSObject::mayInterceptIndexedAccesses):
(JSC::JSObject::indexingShouldBeSparse):
(JSC::JSObject::setPrototypeOfInline): Deleted.
(JSC::JSObject::isExtensibleInline): Deleted.

  • runtime/ObjectConstructor.cpp:

(JSC::objectConstructorSetPrototypeOf):
(JSC::objectConstructorIsSealed):
(JSC::objectConstructorIsFrozen):
(JSC::objectConstructorIsExtensible):

  • runtime/ProxyObject.cpp:

(JSC::ProxyObject::performInternalMethodGetOwnProperty):
(JSC::ProxyObject::performHasProperty):
(JSC::ProxyObject::performPreventExtensions):
(JSC::ProxyObject::performIsExtensible):

  • runtime/ReflectObject.cpp:

(JSC::reflectObjectIsExtensible):
(JSC::reflectObjectSetPrototypeOf):

  • runtime/StringObject.cpp:

(JSC::StringObject::defineOwnProperty):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/runtime/JSObject.cpp

    r197467 r197484  
    12121212}
    12131213
    1214 bool JSObject::setPrototypeOf(JSObject* object, ExecState* exec, JSValue prototype)
     1214bool JSObject::setPrototype(JSObject* object, ExecState* exec, JSValue prototype)
    12151215{
    12161216    return object->setPrototypeWithCycleCheck(exec->vm(), exec, prototype);
     1217}
     1218
     1219bool JSObject::setPrototype(VM& vm, ExecState* exec, JSValue prototype)
     1220{
     1221    return methodTable(vm)->setPrototype(this, exec, prototype);
    12171222}
    12181223
     
    17001705{
    17011706    return obj->isExtensibleImpl();
     1707}
     1708
     1709bool JSObject::isExtensible(ExecState* exec)
     1710{
     1711    VM& vm = exec->vm();
     1712    return methodTable(vm)->isExtensible(this, exec);
    17021713}
    17031714
     
    28642875    PropertyDescriptor current;
    28652876    bool isCurrentDefined = getOwnPropertyDescriptor(exec, propertyName, current);
    2866     bool isExtensible = isExtensibleInline(exec);
     2877    bool isExtensible = this->isExtensible(exec);
    28672878    if (UNLIKELY(exec->hadException()))
    28682879        return false;
Note: See TracChangeset for help on using the changeset viewer.