Changeset 34985 in webkit for trunk/JavaScriptCore


Ignore:
Timestamp:
Jul 3, 2008, 12:06:52 PM (17 years ago)
Author:
[email protected]
Message:

2008-07-03 Geoffrey Garen <[email protected]>

Reviewed by Sam Weinig.


Removed checking for the array get/put fast case from the array code.
Callers who want the fast case should call getIndex and/or setIndex
instead. (get_by_val and put_by_val already do this.)


SunSpider reports no change overall, but a 1.4% speedup on fannkuch and
a 3.6% speedup on nsieve.

Location:
trunk/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r34983 r34985  
     12008-07-03  Geoffrey Garen  <[email protected]>
     2
     3        Reviewed by Sam Weinig.
     4       
     5        Removed checking for the array get/put fast case from the array code.
     6        Callers who want the fast case should call getIndex and/or setIndex
     7        instead. (get_by_val and put_by_val already do this.)
     8       
     9        SunSpider reports no change overall, but a 1.4% speedup on fannkuch and
     10        a 3.6% speedup on nsieve.
     11
    1122008-07-03  Dan Bernstein  <[email protected]>
    213
  • trunk/JavaScriptCore/kjs/JSArray.cpp

    r34964 r34985  
    127127}
    128128
    129 NEVER_INLINE bool JSArray::getOwnPropertySlotSlowCase(ExecState* exec, unsigned i, PropertySlot& slot)
     129bool JSArray::getOwnPropertySlot(ExecState* exec, unsigned i, PropertySlot& slot)
    130130{
    131131    ArrayStorage* storage = m_storage;
     
    171171}
    172172
    173 bool JSArray::getOwnPropertySlot(ExecState* exec, unsigned i, PropertySlot& slot)
    174 {
    175     if (i < m_fastAccessCutoff) {
    176         slot.setValueSlot(&m_storage->m_vector[i]);
    177         return true;
    178     }
    179 
    180     return getOwnPropertySlotSlowCase(exec, i, slot);
    181 }
    182 
    183173// ECMA 15.4.5.1
    184174void JSArray::put(ExecState* exec, const Identifier& propertyName, JSValue* value)
     
    207197{
    208198    checkConsistency();
    209 
    210     if (i < m_fastAccessCutoff) {
    211         m_storage->m_vector[i] = value;
    212         checkConsistency();
    213         return;
    214     }
    215199
    216200    unsigned length = m_length;
Note: See TracChangeset for help on using the changeset viewer.