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