OLD | NEW |
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 | 9 |
10 #include "src/assert-scope.h" | 10 #include "src/assert-scope.h" |
(...skipping 2022 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2033 inline bool HasFixedFloat32Elements(); | 2033 inline bool HasFixedFloat32Elements(); |
2034 inline bool HasFixedFloat64Elements(); | 2034 inline bool HasFixedFloat64Elements(); |
2035 | 2035 |
2036 inline bool HasFastArgumentsElements(); | 2036 inline bool HasFastArgumentsElements(); |
2037 inline bool HasSlowArgumentsElements(); | 2037 inline bool HasSlowArgumentsElements(); |
2038 inline bool HasFastStringWrapperElements(); | 2038 inline bool HasFastStringWrapperElements(); |
2039 inline bool HasSlowStringWrapperElements(); | 2039 inline bool HasSlowStringWrapperElements(); |
2040 inline SeededNumberDictionary* element_dictionary(); // Gets slow elements. | 2040 inline SeededNumberDictionary* element_dictionary(); // Gets slow elements. |
2041 | 2041 |
2042 // Requires: HasFastElements(). | 2042 // Requires: HasFastElements(). |
2043 static Handle<FixedArray> EnsureWritableFastElements( | 2043 static void EnsureWritableFastElements(Handle<JSObject> object); |
2044 Handle<JSObject> object); | |
2045 | 2044 |
2046 // Collects elements starting at index 0. | 2045 // Collects elements starting at index 0. |
2047 // Undefined values are placed after non-undefined values. | 2046 // Undefined values are placed after non-undefined values. |
2048 // Returns the number of non-undefined values. | 2047 // Returns the number of non-undefined values. |
2049 static Handle<Object> PrepareElementsForSort(Handle<JSObject> object, | 2048 static Handle<Object> PrepareElementsForSort(Handle<JSObject> object, |
2050 uint32_t limit); | 2049 uint32_t limit); |
2051 // As PrepareElementsForSort, but only on objects where elements is | 2050 // As PrepareElementsForSort, but only on objects where elements is |
2052 // a dictionary, and it will stay a dictionary. Collates undefined and | 2051 // a dictionary, and it will stay a dictionary. Collates undefined and |
2053 // unexisting elements below limit from position zero of the elements. | 2052 // unexisting elements below limit from position zero of the elements. |
2054 static Handle<Object> PrepareSlowElementsForSort(Handle<JSObject> object, | 2053 static Handle<Object> PrepareSlowElementsForSort(Handle<JSObject> object, |
(...skipping 8779 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10834 } | 10833 } |
10835 return value; | 10834 return value; |
10836 } | 10835 } |
10837 }; | 10836 }; |
10838 | 10837 |
10839 | 10838 |
10840 } // NOLINT, false-positive due to second-order macros. | 10839 } // NOLINT, false-positive due to second-order macros. |
10841 } // NOLINT, false-positive due to second-order macros. | 10840 } // NOLINT, false-positive due to second-order macros. |
10842 | 10841 |
10843 #endif // V8_OBJECTS_H_ | 10842 #endif // V8_OBJECTS_H_ |
OLD | NEW |