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

Side by Side Diff: src/objects.h

Issue 2737373003: Move CopyValuesTo to SeededNumberDictionary. (Closed)
Patch Set: Created 3 years, 9 months 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
« no previous file with comments | « no previous file | src/objects.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3589 matching lines...) Expand 10 before | Expand all | Expand 10 after
3600 // Delete a property from the dictionary. 3600 // Delete a property from the dictionary.
3601 static Handle<Object> DeleteProperty(Handle<Derived> dictionary, int entry); 3601 static Handle<Object> DeleteProperty(Handle<Derived> dictionary, int entry);
3602 3602
3603 // Attempt to shrink the dictionary after deletion of key. 3603 // Attempt to shrink the dictionary after deletion of key.
3604 MUST_USE_RESULT static inline Handle<Derived> Shrink( 3604 MUST_USE_RESULT static inline Handle<Derived> Shrink(
3605 Handle<Derived> dictionary, 3605 Handle<Derived> dictionary,
3606 Key key) { 3606 Key key) {
3607 return DerivedHashTable::Shrink(dictionary, key); 3607 return DerivedHashTable::Shrink(dictionary, key);
3608 } 3608 }
3609 3609
3610 // Sorting support
3611 // TODO(dcarney): templatize or move to SeededNumberDictionary
3612 void CopyValuesTo(FixedArray* elements);
3613
3614 // Returns the number of elements in the dictionary filtering out properties 3610 // Returns the number of elements in the dictionary filtering out properties
3615 // with the specified attributes. 3611 // with the specified attributes.
3616 int NumberOfElementsFilterAttributes(PropertyFilter filter); 3612 int NumberOfElementsFilterAttributes(PropertyFilter filter);
3617 3613
3618 // Returns the number of enumerable elements in the dictionary. 3614 // Returns the number of enumerable elements in the dictionary.
3619 int NumberOfEnumElements() { 3615 int NumberOfEnumElements() {
3620 return NumberOfElementsFilterAttributes(ENUMERABLE_STRINGS); 3616 return NumberOfElementsFilterAttributes(ENUMERABLE_STRINGS);
3621 } 3617 }
3622 3618
3623 enum SortMode { UNSORTED, SORTED }; 3619 enum SortMode { UNSORTED, SORTED };
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
3870 Handle<SeededNumberDictionary> dictionary, uint32_t key, 3866 Handle<SeededNumberDictionary> dictionary, uint32_t key,
3871 Handle<Object> value, PropertyDetails details, 3867 Handle<Object> value, PropertyDetails details,
3872 Handle<JSObject> dictionary_holder); 3868 Handle<JSObject> dictionary_holder);
3873 3869
3874 void UpdateMaxNumberKey(uint32_t key, Handle<JSObject> dictionary_holder); 3870 void UpdateMaxNumberKey(uint32_t key, Handle<JSObject> dictionary_holder);
3875 3871
3876 // Returns true if the dictionary contains any elements that are non-writable, 3872 // Returns true if the dictionary contains any elements that are non-writable,
3877 // non-configurable, non-enumerable, or have getters/setters. 3873 // non-configurable, non-enumerable, or have getters/setters.
3878 bool HasComplexElements(); 3874 bool HasComplexElements();
3879 3875
3876 // Sorting support
3877 void CopyValuesTo(FixedArray* elements);
3878
3880 // If slow elements are required we will never go back to fast-case 3879 // If slow elements are required we will never go back to fast-case
3881 // for the elements kept in this dictionary. We require slow 3880 // for the elements kept in this dictionary. We require slow
3882 // elements if an element has been added at an index larger than 3881 // elements if an element has been added at an index larger than
3883 // kRequiresSlowElementsLimit or set_requires_slow_elements() has been called 3882 // kRequiresSlowElementsLimit or set_requires_slow_elements() has been called
3884 // when defining a getter or setter with a number key. 3883 // when defining a getter or setter with a number key.
3885 inline bool requires_slow_elements(); 3884 inline bool requires_slow_elements();
3886 inline void set_requires_slow_elements(); 3885 inline void set_requires_slow_elements();
3887 3886
3888 // Get the value of the max number key that has been added to this 3887 // Get the value of the max number key that has been added to this
3889 // dictionary. max_number_key can only be called if 3888 // dictionary. max_number_key can only be called if
(...skipping 7682 matching lines...) Expand 10 before | Expand all | Expand 10 after
11572 } 11571 }
11573 }; 11572 };
11574 11573
11575 11574
11576 } // NOLINT, false-positive due to second-order macros. 11575 } // NOLINT, false-positive due to second-order macros.
11577 } // NOLINT, false-positive due to second-order macros. 11576 } // NOLINT, false-positive due to second-order macros.
11578 11577
11579 #include "src/objects/object-macros-undef.h" 11578 #include "src/objects/object-macros-undef.h"
11580 11579
11581 #endif // V8_OBJECTS_H_ 11580 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « no previous file | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698