Ignore:
Timestamp:
Sep 22, 2017, 3:25:58 AM (8 years ago)
Author:
Yusuke Suzuki
Message:

Unreviewed, rolling out r222380.
https://bugs.webkit.org/show_bug.cgi?id=177352

Octane/box2d shows 8% regression (Requested by yusukesuzuki on
#webkit).

Reverted changeset:

"[DFG][FTL] Profile array vector length for array allocation"
https://bugs.webkit.org/show_bug.cgi?id=177051
http://trac.webkit.org/changeset/222380

Patch by Commit Queue <[email protected]> on 2017-09-22

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/runtime/JSArray.h

    r222380 r222382  
    5555public:
    5656    static JSArray* tryCreate(VM&, Structure*, unsigned initialLength = 0);
    57     static JSArray* tryCreate(VM&, Structure*, unsigned initialLength, unsigned vectorLengthHint);
    5857    static JSArray* create(VM&, Structure*, unsigned initialLength = 0);
    5958    static JSArray* createWithButterfly(VM&, GCDeferralContext*, Structure*, Butterfly*);
     
    217216    VM&, JSCell* intendedOwner, unsigned initialLength);
    218217
    219 inline JSArray* JSArray::tryCreate(VM& vm, Structure* structure, unsigned initialLength, unsigned vectorLengthHint)
    220 {
    221     ASSERT(vectorLengthHint >= initialLength);
     218inline JSArray* JSArray::tryCreate(VM& vm, Structure* structure, unsigned initialLength)
     219{
    222220    unsigned outOfLineStorage = structure->outOfLineCapacity();
    223221
     
    231229            || hasContiguous(indexingType));
    232230
    233         if (UNLIKELY(vectorLengthHint > MAX_STORAGE_VECTOR_LENGTH))
     231        if (UNLIKELY(initialLength > MAX_STORAGE_VECTOR_LENGTH))
    234232            return nullptr;
    235233
    236         unsigned vectorLength = Butterfly::optimalContiguousVectorLength(structure, vectorLengthHint);
     234        unsigned vectorLength = Butterfly::optimalContiguousVectorLength(structure, initialLength);
    237235        void* temp = vm.jsValueGigacageAuxiliarySpace.tryAllocate(nullptr, Butterfly::totalSize(0, outOfLineStorage, true, vectorLength * sizeof(EncodedJSValue)));
    238236        if (!temp)
     
    259257}
    260258
    261 inline JSArray* JSArray::tryCreate(VM& vm, Structure* structure, unsigned initialLength)
    262 {
    263     return tryCreate(vm, structure, initialLength, initialLength);
    264 }
    265 
    266259inline JSArray* JSArray::create(VM& vm, Structure* structure, unsigned initialLength)
    267260{
Note: See TracChangeset for help on using the changeset viewer.