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_HEAP_HEAP_H_ | 5 #ifndef V8_HEAP_HEAP_H_ |
6 #define V8_HEAP_HEAP_H_ | 6 #define V8_HEAP_HEAP_H_ |
7 | 7 |
8 #include <cmath> | 8 #include <cmath> |
9 #include <map> | 9 #include <map> |
10 | 10 |
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
542 static const int kMakeHeapIterableMask = kAbortIncrementalMarkingMask; | 542 static const int kMakeHeapIterableMask = kAbortIncrementalMarkingMask; |
543 | 543 |
544 // The roots that have an index less than this are always in old space. | 544 // The roots that have an index less than this are always in old space. |
545 static const int kOldSpaceRoots = 0x20; | 545 static const int kOldSpaceRoots = 0x20; |
546 | 546 |
547 // The minimum size of a HeapObject on the heap. | 547 // The minimum size of a HeapObject on the heap. |
548 static const int kMinObjectSizeInWords = 2; | 548 static const int kMinObjectSizeInWords = 2; |
549 | 549 |
550 STATIC_ASSERT(kUndefinedValueRootIndex == | 550 STATIC_ASSERT(kUndefinedValueRootIndex == |
551 Internals::kUndefinedValueRootIndex); | 551 Internals::kUndefinedValueRootIndex); |
| 552 STATIC_ASSERT(kTheHoleValueRootIndex == Internals::kTheHoleValueRootIndex); |
552 STATIC_ASSERT(kNullValueRootIndex == Internals::kNullValueRootIndex); | 553 STATIC_ASSERT(kNullValueRootIndex == Internals::kNullValueRootIndex); |
553 STATIC_ASSERT(kTrueValueRootIndex == Internals::kTrueValueRootIndex); | 554 STATIC_ASSERT(kTrueValueRootIndex == Internals::kTrueValueRootIndex); |
554 STATIC_ASSERT(kFalseValueRootIndex == Internals::kFalseValueRootIndex); | 555 STATIC_ASSERT(kFalseValueRootIndex == Internals::kFalseValueRootIndex); |
555 STATIC_ASSERT(kempty_stringRootIndex == Internals::kEmptyStringRootIndex); | 556 STATIC_ASSERT(kempty_stringRootIndex == Internals::kEmptyStringRootIndex); |
556 | 557 |
557 // Calculates the maximum amount of filler that could be required by the | 558 // Calculates the maximum amount of filler that could be required by the |
558 // given alignment. | 559 // given alignment. |
559 static int GetMaximumFillToAlign(AllocationAlignment alignment); | 560 static int GetMaximumFillToAlign(AllocationAlignment alignment); |
560 // Calculates the actual amount of filler required for a given address at the | 561 // Calculates the actual amount of filler required for a given address at the |
561 // given alignment. | 562 // given alignment. |
(...skipping 2093 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2655 friend class LargeObjectSpace; | 2656 friend class LargeObjectSpace; |
2656 friend class NewSpace; | 2657 friend class NewSpace; |
2657 friend class PagedSpace; | 2658 friend class PagedSpace; |
2658 DISALLOW_COPY_AND_ASSIGN(AllocationObserver); | 2659 DISALLOW_COPY_AND_ASSIGN(AllocationObserver); |
2659 }; | 2660 }; |
2660 | 2661 |
2661 } // namespace internal | 2662 } // namespace internal |
2662 } // namespace v8 | 2663 } // namespace v8 |
2663 | 2664 |
2664 #endif // V8_HEAP_HEAP_H_ | 2665 #endif // V8_HEAP_HEAP_H_ |
OLD | NEW |