Changeset 15468 in webkit for trunk/JavaScriptCore/kjs/property_map.cpp
- Timestamp:
- Jul 16, 2006, 2:06:28 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/property_map.cpp
r14951 r15468 25 25 #include "object.h" 26 26 #include "protect.h" 27 #include " reference_list.h"27 #include "PropertyNameArray.h" 28 28 #include <algorithm> 29 29 #include <wtf/FastMalloc.h> … … 75 75 76 76 // lastIndexUsed is an ever-increasing index used to identify the order items 77 // were inserted into the property map. It's vital that addEnumerablesToReferenceList77 // were inserted into the property map. It's vital that getEnumerablePropertyNames 78 78 // return the properties in the order they were added for compatibility with other 79 79 // browsers' JavaScript implementations. … … 584 584 } 585 585 586 void PropertyMap:: addEnumerablesToReferenceList(ReferenceList &list, JSObject *base) const586 void PropertyMap::getEnumerablePropertyNames(PropertyNameArray& propertyNames) const 587 587 { 588 588 if (!_table) { … … 590 590 UString::Rep *key = _singleEntry.key; 591 591 if (key && !(_singleEntry.attributes & DontEnum)) 592 list.append(Reference(base, Identifier(key)));592 propertyNames.add(Identifier(key)); 593 593 #endif 594 594 return; … … 611 611 qsort(sortedEnumerables.data(), p - sortedEnumerables.data(), sizeof(Entry*), comparePropertyMapEntryIndices); 612 612 613 // Put the keys of the sorted entries into the referencelist.613 // Put the keys of the sorted entries into the list. 614 614 for (Entry** q = sortedEnumerables.data(); q != p; ++q) 615 list.append(Reference(base, Identifier((*q)->key)));616 } 617 618 void PropertyMap:: addSparseArrayPropertiesToReferenceList(ReferenceList &list, JSObject *base) const615 propertyNames.add(Identifier(q[0]->key)); 616 } 617 618 void PropertyMap::getSparseArrayPropertyNames(PropertyNameArray& propertyNames) const 619 619 { 620 620 if (!_table) { … … 626 626 k.toUInt32(&fitsInUInt32); 627 627 if (fitsInUInt32) 628 list.append(Reference(base, Identifier(key)));628 propertyNames.add(Identifier(key)); 629 629 } 630 630 #endif … … 641 641 k.toUInt32(&fitsInUInt32); 642 642 if (fitsInUInt32) 643 list.append(Reference(base, Identifier(key)));643 propertyNames.add(Identifier(key)); 644 644 } 645 645 }
Note:
See TracChangeset
for help on using the changeset viewer.