Ignore:
Timestamp:
Jun 13, 2007, 9:58:04 PM (18 years ago)
Author:
darin
Message:

JavaScriptCore:

Reviewed by Mark Rowe.

Test: fast/js/sort-large-array.html

  • kjs/array_instance.h: Replaced pushUndefinedObjectsToEnd with compactForSorting, and removed ExecState parameters.
  • kjs/array_object.cpp: (ArrayInstance::sort): Changed to call compactForSorting. (ArrayInstance::compactForSorting): Do the get and delete of the properties directly on the property map instead of using public calls from JSObject. The public calls would just read the undefined values from the compacted sort results array!

LayoutTests:

Reviewed by Mark Rowe.

  • fast/js/resources/sort-large-array.js: Added.
  • fast/js/sort-large-array-expected.txt: Added.
  • fast/js/sort-large-array.html: Added.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/array_instance.h

    r21029 r23521  
    33 *  This file is part of the KDE libraries
    44 *  Copyright (C) 1999-2000 Harri Porten ([email protected])
    5  *  Copyright (C) 2003 Apple Computer, Inc.
     5 *  Copyright (C) 2003, 2007 Apple Inc. All rights reserved.
    66 *
    77 *  This library is free software; you can redistribute it and/or
     
    5858    void setLength(unsigned newLength, ExecState *exec);
    5959   
    60     unsigned pushUndefinedObjectsToEnd(ExecState *exec);
     60    unsigned compactForSorting();
    6161   
    6262    void resizeStorage(unsigned);
Note: See TracChangeset for help on using the changeset viewer.