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_H_ | 5 #ifndef V8_HEAP_H_ |
6 #define V8_HEAP_H_ | 6 #define V8_HEAP_H_ |
7 | 7 |
8 #include <cmath> | 8 #include <cmath> |
9 | 9 |
10 #include "allocation.h" | 10 #include "allocation.h" |
(...skipping 1114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1125 | 1125 |
1126 #define ROOT_INDEX_DECLARATION(type, name, camel_name) k##camel_name##RootIndex, | 1126 #define ROOT_INDEX_DECLARATION(type, name, camel_name) k##camel_name##RootIndex, |
1127 SMI_ROOT_LIST(ROOT_INDEX_DECLARATION) | 1127 SMI_ROOT_LIST(ROOT_INDEX_DECLARATION) |
1128 #undef ROOT_INDEX_DECLARATION | 1128 #undef ROOT_INDEX_DECLARATION |
1129 | 1129 |
1130 kRootListLength, | 1130 kRootListLength, |
1131 kStrongRootListLength = kStringTableRootIndex, | 1131 kStrongRootListLength = kStringTableRootIndex, |
1132 kSmiRootsStart = kStringTableRootIndex + 1 | 1132 kSmiRootsStart = kStringTableRootIndex + 1 |
1133 }; | 1133 }; |
1134 | 1134 |
1135 STATIC_CHECK(kUndefinedValueRootIndex == Internals::kUndefinedValueRootIndex); | 1135 STATIC_ASSERT(kUndefinedValueRootIndex == |
1136 STATIC_CHECK(kNullValueRootIndex == Internals::kNullValueRootIndex); | 1136 Internals::kUndefinedValueRootIndex); |
1137 STATIC_CHECK(kTrueValueRootIndex == Internals::kTrueValueRootIndex); | 1137 STATIC_ASSERT(kNullValueRootIndex == Internals::kNullValueRootIndex); |
1138 STATIC_CHECK(kFalseValueRootIndex == Internals::kFalseValueRootIndex); | 1138 STATIC_ASSERT(kTrueValueRootIndex == Internals::kTrueValueRootIndex); |
1139 STATIC_CHECK(kempty_stringRootIndex == Internals::kEmptyStringRootIndex); | 1139 STATIC_ASSERT(kFalseValueRootIndex == Internals::kFalseValueRootIndex); |
| 1140 STATIC_ASSERT(kempty_stringRootIndex == Internals::kEmptyStringRootIndex); |
1140 | 1141 |
1141 // Generated code can embed direct references to non-writable roots if | 1142 // Generated code can embed direct references to non-writable roots if |
1142 // they are in new space. | 1143 // they are in new space. |
1143 static bool RootCanBeWrittenAfterInitialization(RootListIndex root_index); | 1144 static bool RootCanBeWrittenAfterInitialization(RootListIndex root_index); |
1144 // Generated code can treat direct references to this root as constant. | 1145 // Generated code can treat direct references to this root as constant. |
1145 bool RootCanBeTreatedAsConstant(RootListIndex root_index); | 1146 bool RootCanBeTreatedAsConstant(RootListIndex root_index); |
1146 | 1147 |
1147 Map* MapForFixedTypedArray(ExternalArrayType array_type); | 1148 Map* MapForFixedTypedArray(ExternalArrayType array_type); |
1148 RootListIndex RootIndexForFixedTypedArray( | 1149 RootListIndex RootIndexForFixedTypedArray( |
1149 ExternalArrayType array_type); | 1150 ExternalArrayType array_type); |
(...skipping 1610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2760 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 2761 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
2761 | 2762 |
2762 private: | 2763 private: |
2763 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2764 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
2764 }; | 2765 }; |
2765 #endif // DEBUG | 2766 #endif // DEBUG |
2766 | 2767 |
2767 } } // namespace v8::internal | 2768 } } // namespace v8::internal |
2768 | 2769 |
2769 #endif // V8_HEAP_H_ | 2770 #endif // V8_HEAP_H_ |
OLD | NEW |