Ignore:
Timestamp:
Nov 9, 2009, 6:19:04 PM (16 years ago)
Author:
[email protected]
Message:

Can cache prototype lookups on uncacheable dictionaries.
https://bugs.webkit.org/show_bug.cgi?id=31198

Reviewed by Gavin Barraclough.

Replace fromDictionaryTransition with flattenDictionaryObject and
flattenDictionaryStructure. This change is necessary as we need to
guarantee that our attempt to convert away from a dictionary structure
will definitely succeed, and in some cases this requires mutating the
object storage itself.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/jit/JITStubs.cpp

    r50443 r50704  
    772772        // should not be treated as a dictionary.
    773773        if (slotBaseObject->structure()->isDictionary())
    774             slotBaseObject->setStructure(Structure::fromDictionaryTransition(slotBaseObject->structure()));
     774            slotBaseObject->flattenDictionaryObject();
    775775       
    776776        stubInfo->initGetByIdProto(structure, slotBaseObject->structure());
     
    11821182        // should not be treated as a dictionary.
    11831183        if (slotBaseObject->structure()->isDictionary())
    1184             slotBaseObject->setStructure(Structure::fromDictionaryTransition(slotBaseObject->structure()));
     1184            slotBaseObject->flattenDictionaryObject();
    11851185
    11861186        // The result fetched should always be the callee!
     
    13351335        // should not be treated as a dictionary.
    13361336        if (slotBaseObject->structure()->isDictionary())
    1337             slotBaseObject->setStructure(Structure::fromDictionaryTransition(slotBaseObject->structure()));
     1337            slotBaseObject->flattenDictionaryObject();
    13381338
    13391339        int listIndex;
Note: See TracChangeset for help on using the changeset viewer.