Repatch should support setters and plant calls to them directly
https://bugs.webkit.org/show_bug.cgi?id=130750
Source/JavaScriptCore:
Reviewed by Geoffrey Garen.
All of the infrastructure was in place so this just enables setter optimization.
This is a 12x speed-up on setter microbenchmarks. This is a 1% speed-up on Octane.
- bytecode/PolymorphicPutByIdList.cpp:
(JSC::PutByIdAccess::visitWeak):
- bytecode/PolymorphicPutByIdList.h:
(JSC::PutByIdAccess::setter):
(JSC::PutByIdAccess::customSetter): Deleted.
- bytecode/PutByIdStatus.cpp:
(JSC::PutByIdStatus::computeForStubInfo):
(JSC::toString):
(JSC::kindFor):
(JSC::customFor):
(JSC::generateByIdStub):
(JSC::tryCachePutByID):
(JSC::tryBuildPutByIdList):
(JSC::JSObject::put):
(JSC::putEntry):
- runtime/PutPropertySlot.h:
(JSC::PutPropertySlot::setCacheableSetter):
(JSC::PutPropertySlot::isCacheableSetter):
(JSC::PutPropertySlot::isCacheableCustom):
(JSC::PutPropertySlot::setCacheableCustomProperty): Deleted.
(JSC::PutPropertySlot::isCacheableCustomProperty): Deleted.
- tests/stress/setter.js: Added.
(foo):
LayoutTests:
Reviewed by Geoffrey Garen.
- js/regress/script-tests/setter.js: Added.
- js/regress/setter-expected.txt: Added.
- js/regress/setter.html: Added.