SetPrototypeOf should be a fully virtual method in ClassInfo::methodTable
https://bugs.webkit.org/show_bug.cgi?id=154897
Reviewed by Filip Pizlo.
This patch makes us more consistent with how the ES6 specification models the
SetPrototypeOf trap. Moving this method into ClassInfo::methodTable
is a prerequisite for implementing Proxy.SetPrototypeOf. This patch
still allows directly setting the prototype for situations where this
is the desired behavior. This is equivalent to setting the internal
Prototype field as described in the specification.
(OpaqueJSClass::prototype):
(JSObjectMake):
(JSObjectSetPrototype):
(JSObjectHasProperty):
(makeWrapper):
- runtime/ClassInfo.h:
- runtime/IntlCollatorConstructor.cpp:
(JSC::constructIntlCollator):
- runtime/IntlDateTimeFormatConstructor.cpp:
(JSC::constructIntlDateTimeFormat):
- runtime/IntlNumberFormatConstructor.cpp:
(JSC::constructIntlNumberFormat):
(JSC::JSCell::isExtensible):
(JSC::JSCell::setPrototypeOf):
- runtime/JSCell.h:
- runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::resetPrototype):
- runtime/JSGlobalObjectFunctions.cpp:
(JSC::globalFuncProtoSetter):
(JSC::JSObject::switchToSlowPutArrayStorage):
(JSC::JSObject::setPrototypeDirect):
(JSC::JSObject::setPrototypeWithCycleCheck):
(JSC::JSObject::setPrototypeOf):
(JSC::JSObject::allowsAccessFrom):
(JSC::JSObject::setPrototype): Deleted.
(JSC::JSObject::setPrototypeOfInline):
(JSC::JSObject::mayInterceptIndexedAccesses):
(JSC::JSProxy::setTarget):
- runtime/ObjectConstructor.cpp:
(JSC::objectConstructorSetPrototypeOf):
- runtime/ReflectObject.cpp:
(JSC::reflectObjectSetPrototypeOf):