Changeset 37388 in webkit for trunk/JavaScriptCore/VM/CTI.cpp


Ignore:
Timestamp:
Oct 7, 2008, 1:49:36 PM (17 years ago)
Author:
[email protected]
Message:

2008-10-07 Sam Weinig <[email protected]>

Reviewed by Cameron Zwarich.

Roll r37370 back in with bug fixes.

  • PropertyMap::storageSize() should reflect the number of keys + deletedOffsets and has nothing to do with the internal deletedSentinel count anymore.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/VM/CTI.cpp

    r37386 r37388  
    27782778static JSValue* SFX_CALL transitionObject(StructureID* newStructureID, size_t cachedOffset, JSObject* baseObject, JSValue* value)
    27792779{
    2780     StructureID* oldStructureID = newStructureID->previousID();
    2781 
    27822780    baseObject->transitionTo(newStructureID);
    2783 
    2784     if (oldStructureID->propertyMap().storageSize() == JSObject::inlineStorageCapacity)
    2785         baseObject->allocatePropertyStorage(oldStructureID->propertyMap().storageSize(), oldStructureID->propertyMap().size());
    2786 
    27872781    baseObject->putDirectOffset(cachedOffset, value);
    27882782    return baseObject;
     
    27932787static inline bool transitionWillNeedStorageRealloc(StructureID* oldStructureID, StructureID* newStructureID)
    27942788{
    2795     if (oldStructureID->propertyMap().storageSize() == JSObject::inlineStorageCapacity)
    2796         return true;
    2797 
    2798     if (oldStructureID->propertyMap().storageSize() < JSObject::inlineStorageCapacity)
    2799         return false;
    2800 
    2801     if (oldStructureID->propertyMap().size() != newStructureID->propertyMap().size())
    2802         return true;
    2803 
    2804     return false;
     2789    return oldStructureID->propertyStorageCapacity() != newStructureID->propertyStorageCapacity();
    28052790}
    28062791
Note: See TracChangeset for help on using the changeset viewer.