Indexed getters should return values directly on the PropertySlot.
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 Jun 2014 23:56:50 +0000 (23:56 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 Jun 2014 23:56:50 +0000 (23:56 +0000)
commit38077e972c65943093b10e3681115b3b12e342b1
tree5cc6e4c05c17728af7c0e7aaea437c73b8603639
parentfb3482a241575f9c069bbe99472aa24db9e1e2a7
Indexed getters should return values directly on the PropertySlot.
<https://webkit.org/b/133586>

Source/JavaScriptCore:
Remove PropertySlot's custom index mode.

Reviewed by Darin Adler.

* runtime/JSObject.h:
(JSC::PropertySlot::getValue):
* runtime/PropertySlot.h:
(JSC::PropertySlot::setCustomIndex): Deleted.

Source/WebCore:
Make indexed getters more efficient by using PropertySlot::setValue()
to pass the value directly back through the slot, instead of giving it
a function pointer that JSC would then immediately call back through
to retrieve the value.

The function pointer approach would make sense if we did inline caching
of indexed getters but since we currently don't, this is pure overhead.

Reviewed by Darin Adler.

* bindings/js/JSCSSStyleDeclarationCustom.cpp:
(WebCore::JSCSSStyleDeclaration::getOwnPropertySlotDelegate):
(WebCore::cssPropertyGetterPixelOrPosPrefixCallback): Deleted.
(WebCore::cssPropertyGetterCallback): Deleted.
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::getOwnPropertySlot):
(WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
(WebCore::indexGetter): Deleted.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateGetOwnPropertySlotBody):
(GenerateHeader):
(GetIndexedGetterExpression):
(GenerateImplementation):
* bridge/runtime_array.cpp:
(JSC::RuntimeArray::getOwnPropertySlot):
(JSC::RuntimeArray::getOwnPropertySlotByIndex):
(JSC::RuntimeArray::indexGetter): Deleted.
* bridge/runtime_array.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@169668 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/JSObject.h
Source/JavaScriptCore/runtime/PropertySlot.h
Source/WebCore/ChangeLog
Source/WebCore/bindings/js/JSCSSStyleDeclarationCustom.cpp
Source/WebCore/bindings/js/JSDOMWindowCustom.cpp
Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.h
Source/WebCore/bridge/runtime_array.cpp
Source/WebCore/bridge/runtime_array.h