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 | 9 |
10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
653 case MAP_SPACE: | 653 case MAP_SPACE: |
654 return map_space(); | 654 return map_space(); |
655 case CODE_SPACE: | 655 case CODE_SPACE: |
656 return code_space(); | 656 return code_space(); |
657 case NEW_SPACE: | 657 case NEW_SPACE: |
658 case LO_SPACE: | 658 case LO_SPACE: |
659 UNREACHABLE(); | 659 UNREACHABLE(); |
660 } | 660 } |
661 return NULL; | 661 return NULL; |
662 } | 662 } |
| 663 Space* space(int idx) { |
| 664 switch (idx) { |
| 665 case NEW_SPACE: |
| 666 return new_space(); |
| 667 case LO_SPACE: |
| 668 return lo_space(); |
| 669 default: |
| 670 return paged_space(idx); |
| 671 } |
| 672 } |
| 673 |
| 674 // Returns name of the space. |
| 675 const char* GetSpaceName(int idx); |
663 | 676 |
664 bool always_allocate() { return always_allocate_scope_depth_ != 0; } | 677 bool always_allocate() { return always_allocate_scope_depth_ != 0; } |
665 Address always_allocate_scope_depth_address() { | 678 Address always_allocate_scope_depth_address() { |
666 return reinterpret_cast<Address>(&always_allocate_scope_depth_); | 679 return reinterpret_cast<Address>(&always_allocate_scope_depth_); |
667 } | 680 } |
668 | 681 |
669 Address* NewSpaceAllocationTopAddress() { | 682 Address* NewSpaceAllocationTopAddress() { |
670 return new_space_.allocation_top_address(); | 683 return new_space_.allocation_top_address(); |
671 } | 684 } |
672 Address* NewSpaceAllocationLimitAddress() { | 685 Address* NewSpaceAllocationLimitAddress() { |
(...skipping 1933 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2606 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 2619 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
2607 | 2620 |
2608 private: | 2621 private: |
2609 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2622 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
2610 }; | 2623 }; |
2611 #endif // DEBUG | 2624 #endif // DEBUG |
2612 } | 2625 } |
2613 } // namespace v8::internal | 2626 } // namespace v8::internal |
2614 | 2627 |
2615 #endif // V8_HEAP_HEAP_H_ | 2628 #endif // V8_HEAP_HEAP_H_ |
OLD | NEW |