Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(793)

Unified Diff: src/objects.h

Issue 2533223002: Copy dictionary keys and values in enumeration in TransferNamedProperties (Closed)
Patch Set: rip out sorting code Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/bootstrapper.cc ('k') | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index f291d692cfdffb7043c882e5dd7c01588217e643..90461b38e759f35f4a2dee4f946b889c12413c23 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -2897,16 +2897,6 @@ class FixedArray: public FixedArrayBase {
bool IsEqualTo(FixedArray* other);
#endif
- // Swap two elements in a pair of arrays. If this array and the
- // numbers array are the same object, the elements are only swapped
- // once.
- void SwapPairs(FixedArray* numbers, int i, int j);
-
- // Sort prefix of this array and the numbers array as pairs wrt. the
- // numbers. If the numbers array and the this array are the same
- // object, the prefix of this array is sorted.
- void SortPairs(FixedArray* numbers, uint32_t len);
-
typedef FlexibleBodyDescriptor<kHeaderSize> BodyDescriptor;
protected:
@@ -3788,6 +3778,10 @@ class Dictionary: public HashTable<Derived, Shape, Key> {
enum SortMode { UNSORTED, SORTED };
+ // Return the key indices sorted by its enumeration index.
+ static Handle<FixedArray> IterationIndices(
+ Handle<Dictionary<Derived, Shape, Key>> dictionary);
+
// Collect the keys into the given KeyAccumulator, in ascending chronological
// order of property creation.
static void CollectKeysTo(Handle<Dictionary<Derived, Shape, Key>> dictionary,
@@ -3843,11 +3837,6 @@ class Dictionary: public HashTable<Derived, Shape, Key> {
PropertyDetails details,
int* entry_out = nullptr);
- // Returns iteration indices array for the |dictionary|.
- // Values are direct indices in the |HashTable| array.
- static Handle<FixedArray> BuildIterationIndicesArray(
- Handle<Derived> dictionary);
-
static const int kMaxNumberKeyIndex = DerivedHashTable::kPrefixStartIndex;
static const int kNextEnumerationIndexIndex = kMaxNumberKeyIndex + 1;
« no previous file with comments | « src/bootstrapper.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698