Some JSValue::get() micro-optimzations.
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Jun 2014 18:40:13 +0000 (18:40 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Jun 2014 18:40:13 +0000 (18:40 +0000)
commit2fc93a6611487496d4e4bbbbd7a673ea869698ce
tree1e4006a5c56c508800bac244cad023e65a1f2311
parentf28590493b3bb2fd3647c3f03239ab08f9b2a1b3
Some JSValue::get() micro-optimzations.
<https://webkit.org/b/133739>

Tighten some of the property lookup code to improve performance of the
eagerly reified prototype attributes:

- Instead of converting the property name to an integer at every step
  in the prototype chain, move that to a separate pass at the end
  since it should be a rare case.

- Cache the StructureIDTable in a local instead of fetching it from
  the Heap on every step.

- Make fillCustomGetterPropertySlot inline. It was out-of-lined based
  on the assumption that clients would mostly be cacheable GetByIds,
  and it gets pretty hot (~1%) in GetByVal.

- Pass the Structure directly to fillCustomGetterPropertySlot instead
  of refetching it from the StructureIDTable.

Reviewed by Geoff Garen.

* runtime/JSObject.cpp:
(JSC::JSObject::fillCustomGetterPropertySlot): Deleted.
* runtime/JSObject.h:
(JSC::JSObject::inlineGetOwnPropertySlot):
(JSC::JSObject::fillCustomGetterPropertySlot):
(JSC::JSObject::getOwnPropertySlot):
(JSC::JSObject::fastGetOwnPropertySlot):
(JSC::JSObject::getPropertySlot):
(JSC::JSObject::getOwnPropertySlotSlow): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@169815 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/JSObject.cpp
Source/JavaScriptCore/runtime/JSObject.h