Changeset 10857 in webkit for trunk/JavaScriptCore/kjs/property_map.cpp
- Timestamp:
- Oct 15, 2005, 5:46:25 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/property_map.cpp
r10744 r10857 26 26 #include "object.h" 27 27 #include "protect.h" 28 #include " IdentifierSequencedSet.h"28 #include "reference_list.h" 29 29 30 30 #include <algorithm> … … 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 getEnumerablePropertyNames77 // were inserted into the property map. It's vital that addEnumerablesToReferenceList 78 78 // return the properties in the order they were added for compatibility with other 79 79 // browsers' JavaScript implementations. … … 567 567 } 568 568 569 void PropertyMap:: getEnumerablePropertyNames(IdentifierSequencedSet& propertyNames) const569 void PropertyMap::addEnumerablesToReferenceList(ReferenceList &list, ObjectImp *base) const 570 570 { 571 571 if (!_table) { … … 573 573 UString::Rep *key = _singleEntry.key; 574 574 if (key && !(_singleEntry.attributes & DontEnum)) 575 propertyNames.insert(Identifier(key));575 list.append(Reference(base, Identifier(key))); 576 576 #endif 577 577 return; … … 599 599 qsort(sortedEnumerables, p - sortedEnumerables, sizeof(sortedEnumerables[0]), comparePropertyMapEntryIndices); 600 600 601 // Put the keys of the sorted entries into the list.601 // Put the keys of the sorted entries into the reference list. 602 602 Entry **q = sortedEnumerables; 603 while (q != p) { 604 propertyNames.insert(Identifier(q[0]->key)); 605 ++q; 606 } 603 while (q != p) 604 list.append(Reference(base, Identifier((*q++)->key))); 607 605 608 606 // Deallocate the buffer. … … 611 609 } 612 610 613 void PropertyMap:: getSparseArrayPropertyNames(IdentifierSequencedSet& propertyNames) const611 void PropertyMap::addSparseArrayPropertiesToReferenceList(ReferenceList &list, ObjectImp *base) const 614 612 { 615 613 if (!_table) { … … 621 619 k.toUInt32(&fitsInUInt32); 622 620 if (fitsInUInt32) 623 propertyNames.insert(Identifier(key));621 list.append(Reference(base, Identifier(key))); 624 622 } 625 623 #endif … … 636 634 k.toUInt32(&fitsInUInt32); 637 635 if (fitsInUInt32) 638 propertyNames.insert(Identifier(key));636 list.append(Reference(base, Identifier(key))); 639 637 } 640 638 }
Note:
See TracChangeset
for help on using the changeset viewer.