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 937 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
948 // Checks whether an address/object in the heap (including auxiliary | 948 // Checks whether an address/object in the heap (including auxiliary |
949 // area and unused area). | 949 // area and unused area). |
950 bool Contains(Address addr); | 950 bool Contains(Address addr); |
951 bool Contains(HeapObject* value); | 951 bool Contains(HeapObject* value); |
952 | 952 |
953 // Checks whether an address/object in a space. | 953 // Checks whether an address/object in a space. |
954 // Currently used by tests, serialization and heap verification only. | 954 // Currently used by tests, serialization and heap verification only. |
955 bool InSpace(Address addr, AllocationSpace space); | 955 bool InSpace(Address addr, AllocationSpace space); |
956 bool InSpace(HeapObject* value, AllocationSpace space); | 956 bool InSpace(HeapObject* value, AllocationSpace space); |
957 | 957 |
| 958 // Checks whether the space is valid. |
| 959 static bool IsValidAllocationSpace(AllocationSpace space); |
| 960 |
958 // Checks whether the given object is allowed to be migrated from it's | 961 // Checks whether the given object is allowed to be migrated from it's |
959 // current space into the given destination space. Used for debugging. | 962 // current space into the given destination space. Used for debugging. |
960 inline bool AllowedToBeMigrated(HeapObject* object, AllocationSpace dest); | 963 inline bool AllowedToBeMigrated(HeapObject* object, AllocationSpace dest); |
961 | 964 |
962 // Sets the stub_cache_ (only used when expanding the dictionary). | 965 // Sets the stub_cache_ (only used when expanding the dictionary). |
963 void public_set_code_stubs(UnseededNumberDictionary* value) { | 966 void public_set_code_stubs(UnseededNumberDictionary* value) { |
964 roots_[kCodeStubsRootIndex] = value; | 967 roots_[kCodeStubsRootIndex] = value; |
965 } | 968 } |
966 | 969 |
967 // Support for computing object sizes for old objects during GCs. Returns | 970 // Support for computing object sizes for old objects during GCs. Returns |
(...skipping 1759 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2727 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 2730 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
2728 | 2731 |
2729 private: | 2732 private: |
2730 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2733 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
2731 }; | 2734 }; |
2732 #endif // DEBUG | 2735 #endif // DEBUG |
2733 } | 2736 } |
2734 } // namespace v8::internal | 2737 } // namespace v8::internal |
2735 | 2738 |
2736 #endif // V8_HEAP_HEAP_H_ | 2739 #endif // V8_HEAP_HEAP_H_ |
OLD | NEW |