Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(182)

Side by Side Diff: src/heap.h

Issue 304553002: Replace STATIC_CHECK with STATIC_ASSERT. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/contexts.h ('k') | src/heap-snapshot-generator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « src/contexts.h ('k') | src/heap-snapshot-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698