Ignore:
Timestamp:
Apr 4, 2014, 10:56:23 AM (11 years ago)
Author:
[email protected]
Message:

Use JSCell::indexingType instead of Structure::indexingType wherever possible
https://bugs.webkit.org/show_bug.cgi?id=131230

Reviewed by Mark Lam.

Avoid the indirection through the Structure.

  • bytecode/ArrayAllocationProfile.cpp:

(JSC::ArrayAllocationProfile::updateIndexingType):

  • bytecode/ArrayAllocationProfile.h:

(JSC::ArrayAllocationProfile::selectIndexingType):

  • heap/HeapStatistics.cpp:

(JSC::StorageStatistics::operator()):

  • runtime/ArrayPrototype.cpp:

(JSC::attemptFastSort):

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::objectPrototypeIsSane):
(JSC::JSGlobalObject::arrayPrototypeChainIsSane):
(JSC::JSGlobalObject::stringPrototypeChainIsSane):

  • runtime/JSPropertyNameIterator.cpp:

(JSC::JSPropertyNameIterator::create):

File:
1 edited

Legend:

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

    r166415 r166792  
    508508{
    509509    // This will change if we have more indexing types.
    510     IndexingType type = object->structure()->indexingType();
     510    IndexingType type = object->indexingType();
    511511    // This could be made obviously more efficient, but isn't made so right now, because
    512512    // we expect this to be an unlikely slow path anyway.
     
    584584bool JSGlobalObject::objectPrototypeIsSane()
    585585{
    586     return !hasIndexedProperties(m_objectPrototype->structure()->indexingType())
     586    return !hasIndexedProperties(m_objectPrototype->indexingType())
    587587        && m_objectPrototype->prototype().isNull();
    588588}
     
    590590bool JSGlobalObject::arrayPrototypeChainIsSane()
    591591{
    592     return !hasIndexedProperties(m_arrayPrototype->structure()->indexingType())
     592    return !hasIndexedProperties(m_arrayPrototype->indexingType())
    593593        && m_arrayPrototype->prototype() == m_objectPrototype.get()
    594594        && objectPrototypeIsSane();
     
    597597bool JSGlobalObject::stringPrototypeChainIsSane()
    598598{
    599     return !hasIndexedProperties(m_stringPrototype->structure()->indexingType())
     599    return !hasIndexedProperties(m_stringPrototype->indexingType())
    600600        && m_stringPrototype->prototype() == m_objectPrototype.get()
    601601        && objectPrototypeIsSane();
Note: See TracChangeset for help on using the changeset viewer.