OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/allocation.h" | 10 #include "src/allocation.h" |
(...skipping 4390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4401 | 4401 |
4402 // Dispatched behavior. | 4402 // Dispatched behavior. |
4403 DECLARE_PRINTER(FreeSpace) | 4403 DECLARE_PRINTER(FreeSpace) |
4404 DECLARE_VERIFIER(FreeSpace) | 4404 DECLARE_VERIFIER(FreeSpace) |
4405 | 4405 |
4406 // Layout description. | 4406 // Layout description. |
4407 // Size is smi tagged when it is stored. | 4407 // Size is smi tagged when it is stored. |
4408 static const int kSizeOffset = HeapObject::kHeaderSize; | 4408 static const int kSizeOffset = HeapObject::kHeaderSize; |
4409 static const int kNextOffset = POINTER_SIZE_ALIGN(kSizeOffset + kPointerSize); | 4409 static const int kNextOffset = POINTER_SIZE_ALIGN(kSizeOffset + kPointerSize); |
4410 | 4410 |
| 4411 // Minimum size for any free space node. Required to be power of two. |
| 4412 static const int kMinSize = 32; |
| 4413 STATIC_ASSERT(kMinSize >= (kNextOffset + kPointerSize)); |
| 4414 STATIC_ASSERT(IS_POWER_OF_TWO(kMinSize)); |
| 4415 |
4411 private: | 4416 private: |
4412 DISALLOW_IMPLICIT_CONSTRUCTORS(FreeSpace); | 4417 DISALLOW_IMPLICIT_CONSTRUCTORS(FreeSpace); |
4413 }; | 4418 }; |
4414 | 4419 |
4415 | 4420 |
4416 // V has parameters (Type, type, TYPE, C type, element_size) | 4421 // V has parameters (Type, type, TYPE, C type, element_size) |
4417 #define TYPED_ARRAYS(V) \ | 4422 #define TYPED_ARRAYS(V) \ |
4418 V(Uint8, uint8, UINT8, uint8_t, 1) \ | 4423 V(Uint8, uint8, UINT8, uint8_t, 1) \ |
4419 V(Int8, int8, INT8, int8_t, 1) \ | 4424 V(Int8, int8, INT8, int8_t, 1) \ |
4420 V(Uint16, uint16, UINT16, uint16_t, 2) \ | 4425 V(Uint16, uint16, UINT16, uint16_t, 2) \ |
(...skipping 6359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10780 // (elements + properties) in the current level. | 10785 // (elements + properties) in the current level. |
10781 int levelLength_; | 10786 int levelLength_; |
10782 | 10787 |
10783 DISALLOW_COPY_AND_ASSIGN(KeyAccumulator); | 10788 DISALLOW_COPY_AND_ASSIGN(KeyAccumulator); |
10784 }; | 10789 }; |
10785 | 10790 |
10786 } // NOLINT, false-positive due to second-order macros. | 10791 } // NOLINT, false-positive due to second-order macros. |
10787 } // NOLINT, false-positive due to second-order macros. | 10792 } // NOLINT, false-positive due to second-order macros. |
10788 | 10793 |
10789 #endif // V8_OBJECTS_H_ | 10794 #endif // V8_OBJECTS_H_ |
OLD | NEW |