Commit 5e3025ea authored by ggaren@apple.com's avatar ggaren@apple.com

2008-07-03 Geoffrey Garen <ggaren@apple.com>

        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.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34985 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 6201dfec
2008-07-03 Geoffrey Garen <ggaren@apple.com>
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.
2008-07-03 Dan Bernstein <mitz@apple.com>
- Windows build fix
......@@ -126,7 +126,7 @@ JSValue* JSArray::lengthGetter(ExecState* exec, const Identifier&, const Propert
return jsNumber(exec, static_cast<JSArray*>(slot.slotBase())->m_length);
}
NEVER_INLINE bool JSArray::getOwnPropertySlotSlowCase(ExecState* exec, unsigned i, PropertySlot& slot)
bool JSArray::getOwnPropertySlot(ExecState* exec, unsigned i, PropertySlot& slot)
{
ArrayStorage* storage = m_storage;
......@@ -170,16 +170,6 @@ bool JSArray::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName
return JSObject::getOwnPropertySlot(exec, propertyName, slot);
}
bool JSArray::getOwnPropertySlot(ExecState* exec, unsigned i, PropertySlot& slot)
{
if (i < m_fastAccessCutoff) {
slot.setValueSlot(&m_storage->m_vector[i]);
return true;
}
return getOwnPropertySlotSlowCase(exec, i, slot);
}
// ECMA 15.4.5.1
void JSArray::put(ExecState* exec, const Identifier& propertyName, JSValue* value)
{
......@@ -207,12 +197,6 @@ void JSArray::put(ExecState* exec, unsigned i, JSValue* value)
{
checkConsistency();
if (i < m_fastAccessCutoff) {
m_storage->m_vector[i] = value;
checkConsistency();
return;
}
unsigned length = m_length;
if (i >= length && i <= maxArrayIndex) {
length = i + 1;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment