Ignore:
Timestamp:
Sep 17, 2013, 6:06:49 PM (12 years ago)
Author:
[email protected]
Message:

Use CheckStructure for checking the types of typed arrays whenever possible
https://bugs.webkit.org/show_bug.cgi?id=121514

Reviewed by Oliver Hunt.

  • bytecode/ArrayProfile.cpp:

(JSC::ArrayProfile::computeUpdatedPrediction):

  • dfg/DFGArrayMode.cpp:

(JSC::DFG::ArrayMode::fromObserved):
(JSC::DFG::ArrayMode::refine):
(JSC::DFG::ArrayMode::originalArrayStructure):
(JSC::DFG::arrayClassToString):

  • dfg/DFGArrayMode.h:

(JSC::DFG::ArrayMode::ArrayMode):
(JSC::DFG::ArrayMode::arrayModesWithIndexingShape):

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::isOriginalTypedArrayStructure):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/dfg/DFGArrayMode.h

    r155260 r156017  
    8282enum Class {
    8383    NonArray, // Definitely some object that is not a JSArray.
     84    OriginalNonArray, // Definitely some object that is not a JSArray, but that object has the original structure.
    8485    Array, // Definitely a JSArray, and may or may not have custom properties or have undergone some other bizarre transitions.
    8586    OriginalArray, // Definitely a JSArray, and still has one of the primordial JSArray structures for the global object that this code block (possibly inlined code block) belongs to.
     
    124125        u.asBytes.type = type;
    125126        u.asBytes.arrayClass = Array::NonArray;
     127        u.asBytes.speculation = Array::InBounds;
     128        u.asBytes.conversion = Array::AsIs;
     129    }
     130   
     131    ArrayMode(Array::Type type, Array::Class arrayClass)
     132    {
     133        u.asBytes.type = type;
     134        u.asBytes.arrayClass = arrayClass;
    126135        u.asBytes.speculation = Array::InBounds;
    127136        u.asBytes.conversion = Array::AsIs;
     
    418427        switch (arrayClass()) {
    419428        case Array::NonArray:
     429        case Array::OriginalNonArray:
    420430            return asArrayModes(shape);
    421431        case Array::Array:
Note: See TracChangeset for help on using the changeset viewer.