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_INL_H_ | 5 #ifndef V8_HEAP_HEAP_INL_H_ |
6 #define V8_HEAP_HEAP_INL_H_ | 6 #define V8_HEAP_HEAP_INL_H_ |
7 | 7 |
8 #include <cmath> | 8 #include <cmath> |
9 | 9 |
10 #include "src/base/platform/platform.h" | 10 #include "src/base/platform/platform.h" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 #undef STRING_ACCESSOR | 63 #undef STRING_ACCESSOR |
64 | 64 |
65 #define SYMBOL_ACCESSOR(name) \ | 65 #define SYMBOL_ACCESSOR(name) \ |
66 Symbol* Heap::name() { return Symbol::cast(roots_[k##name##RootIndex]); } | 66 Symbol* Heap::name() { return Symbol::cast(roots_[k##name##RootIndex]); } |
67 PRIVATE_SYMBOL_LIST(SYMBOL_ACCESSOR) | 67 PRIVATE_SYMBOL_LIST(SYMBOL_ACCESSOR) |
68 #undef SYMBOL_ACCESSOR | 68 #undef SYMBOL_ACCESSOR |
69 | 69 |
70 #define SYMBOL_ACCESSOR(name, description) \ | 70 #define SYMBOL_ACCESSOR(name, description) \ |
71 Symbol* Heap::name() { return Symbol::cast(roots_[k##name##RootIndex]); } | 71 Symbol* Heap::name() { return Symbol::cast(roots_[k##name##RootIndex]); } |
72 PUBLIC_SYMBOL_LIST(SYMBOL_ACCESSOR) | 72 PUBLIC_SYMBOL_LIST(SYMBOL_ACCESSOR) |
| 73 WELL_KNOWN_SYMBOL_LIST(SYMBOL_ACCESSOR) |
73 #undef SYMBOL_ACCESSOR | 74 #undef SYMBOL_ACCESSOR |
74 | 75 |
75 #define ROOT_ACCESSOR(type, name, camel_name) \ | 76 #define ROOT_ACCESSOR(type, name, camel_name) \ |
76 void Heap::set_##name(type* value) { \ | 77 void Heap::set_##name(type* value) { \ |
77 /* The deserializer makes use of the fact that these common roots are */ \ | 78 /* The deserializer makes use of the fact that these common roots are */ \ |
78 /* never in new space and never on a page that is being compacted. */ \ | 79 /* never in new space and never on a page that is being compacted. */ \ |
79 DCHECK(!deserialization_complete() || \ | 80 DCHECK(!deserialization_complete() || \ |
80 RootCanBeWrittenAfterInitialization(k##camel_name##RootIndex)); \ | 81 RootCanBeWrittenAfterInitialization(k##camel_name##RootIndex)); \ |
81 DCHECK(k##camel_name##RootIndex >= kOldSpaceRoots || !InNewSpace(value)); \ | 82 DCHECK(k##camel_name##RootIndex >= kOldSpaceRoots || !InNewSpace(value)); \ |
82 roots_[k##camel_name##RootIndex] = value; \ | 83 roots_[k##camel_name##RootIndex] = value; \ |
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
699 | 700 |
700 void VerifySmisVisitor::VisitPointers(Object** start, Object** end) { | 701 void VerifySmisVisitor::VisitPointers(Object** start, Object** end) { |
701 for (Object** current = start; current < end; current++) { | 702 for (Object** current = start; current < end; current++) { |
702 CHECK((*current)->IsSmi()); | 703 CHECK((*current)->IsSmi()); |
703 } | 704 } |
704 } | 705 } |
705 } // namespace internal | 706 } // namespace internal |
706 } // namespace v8 | 707 } // namespace v8 |
707 | 708 |
708 #endif // V8_HEAP_HEAP_INL_H_ | 709 #endif // V8_HEAP_HEAP_INL_H_ |
OLD | NEW |