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

Side by Side Diff: src/objects.h

Issue 2533223002: Copy dictionary keys and values in enumeration in TransferNamedProperties (Closed)
Patch Set: 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_OBJECTS_H_ 5 #ifndef V8_OBJECTS_H_
6 #define V8_OBJECTS_H_ 6 #define V8_OBJECTS_H_
7 7
8 #include <iosfwd> 8 #include <iosfwd>
9 #include <memory> 9 #include <memory>
10 10
(...skipping 3770 matching lines...) Expand 10 before | Expand all | Expand 10 after
3781 // with the specified attributes. 3781 // with the specified attributes.
3782 int NumberOfElementsFilterAttributes(PropertyFilter filter); 3782 int NumberOfElementsFilterAttributes(PropertyFilter filter);
3783 3783
3784 // Returns the number of enumerable elements in the dictionary. 3784 // Returns the number of enumerable elements in the dictionary.
3785 int NumberOfEnumElements() { 3785 int NumberOfEnumElements() {
3786 return NumberOfElementsFilterAttributes(ENUMERABLE_STRINGS); 3786 return NumberOfElementsFilterAttributes(ENUMERABLE_STRINGS);
3787 } 3787 }
3788 3788
3789 enum SortMode { UNSORTED, SORTED }; 3789 enum SortMode { UNSORTED, SORTED };
3790 3790
3791 // Return the key indices sorted by its enumeration index.
3792 static Handle<FixedArray> GetOrderedKeyIndices(
3793 Handle<Dictionary<Derived, Shape, Key>> dictionary);
3794
3791 // Collect the keys into the given KeyAccumulator, in ascending chronological 3795 // Collect the keys into the given KeyAccumulator, in ascending chronological
3792 // order of property creation. 3796 // order of property creation.
3793 static void CollectKeysTo(Handle<Dictionary<Derived, Shape, Key>> dictionary, 3797 static void CollectKeysTo(Handle<Dictionary<Derived, Shape, Key>> dictionary,
3794 KeyAccumulator* keys); 3798 KeyAccumulator* keys);
3795 3799
3796 // Copies enumerable keys to preallocated fixed array. 3800 // Copies enumerable keys to preallocated fixed array.
3797 static void CopyEnumKeysTo(Handle<Dictionary<Derived, Shape, Key>> dictionary, 3801 static void CopyEnumKeysTo(Handle<Dictionary<Derived, Shape, Key>> dictionary,
3798 Handle<FixedArray> storage, KeyCollectionMode mode, 3802 Handle<FixedArray> storage, KeyCollectionMode mode,
3799 KeyAccumulator* accumulator); 3803 KeyAccumulator* accumulator);
3800 3804
(...skipping 8106 matching lines...) Expand 10 before | Expand all | Expand 10 after
11907 } 11911 }
11908 return value; 11912 return value;
11909 } 11913 }
11910 }; 11914 };
11911 11915
11912 11916
11913 } // NOLINT, false-positive due to second-order macros. 11917 } // NOLINT, false-positive due to second-order macros.
11914 } // NOLINT, false-positive due to second-order macros. 11918 } // NOLINT, false-positive due to second-order macros.
11915 11919
11916 #endif // V8_OBJECTS_H_ 11920 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/bootstrapper.cc ('k') | src/objects.cc » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698