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 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 2645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2656 // [length]: length of the array. | 2656 // [length]: length of the array. |
2657 inline int length() const; | 2657 inline int length() const; |
2658 inline void set_length(int value); | 2658 inline void set_length(int value); |
2659 | 2659 |
2660 // Get and set the length using acquire loads and release stores. | 2660 // Get and set the length using acquire loads and release stores. |
2661 inline int synchronized_length() const; | 2661 inline int synchronized_length() const; |
2662 inline void synchronized_set_length(int value); | 2662 inline void synchronized_set_length(int value); |
2663 | 2663 |
2664 DECLARE_CAST(FixedArrayBase) | 2664 DECLARE_CAST(FixedArrayBase) |
2665 | 2665 |
| 2666 static int GetMaxLengthForNewSpaceAllocation(ElementsKind kind); |
| 2667 |
2666 // Layout description. | 2668 // Layout description. |
2667 // Length is smi tagged when it is stored. | 2669 // Length is smi tagged when it is stored. |
2668 static const int kLengthOffset = HeapObject::kHeaderSize; | 2670 static const int kLengthOffset = HeapObject::kHeaderSize; |
2669 static const int kHeaderSize = kLengthOffset + kPointerSize; | 2671 static const int kHeaderSize = kLengthOffset + kPointerSize; |
2670 }; | 2672 }; |
2671 | 2673 |
2672 | 2674 |
2673 class FixedDoubleArray; | 2675 class FixedDoubleArray; |
2674 class IncrementalMarking; | 2676 class IncrementalMarking; |
2675 | 2677 |
(...skipping 8391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11067 } | 11069 } |
11068 return value; | 11070 return value; |
11069 } | 11071 } |
11070 }; | 11072 }; |
11071 | 11073 |
11072 | 11074 |
11073 } // NOLINT, false-positive due to second-order macros. | 11075 } // NOLINT, false-positive due to second-order macros. |
11074 } // NOLINT, false-positive due to second-order macros. | 11076 } // NOLINT, false-positive due to second-order macros. |
11075 | 11077 |
11076 #endif // V8_OBJECTS_H_ | 11078 #endif // V8_OBJECTS_H_ |
OLD | NEW |