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

Side by Side Diff: src/heap/spaces.h

Issue 877753007: Reland "Initial switch to Chromium-style CHECK_* and DCHECK_* macros.". (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: VS201x now happy? Created 5 years, 10 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
« no previous file with comments | « src/heap/heap.cc ('k') | src/hydrogen.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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_SPACES_H_ 5 #ifndef V8_HEAP_SPACES_H_
6 #define V8_HEAP_SPACES_H_ 6 #define V8_HEAP_SPACES_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/base/atomicops.h" 9 #include "src/base/atomicops.h"
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 1258 matching lines...) Expand 10 before | Expand all | Expand 10 after
1269 // Page::next_page() call. 1269 // Page::next_page() call.
1270 1270
1271 // An abstraction of allocation and relocation pointers in a page-structured 1271 // An abstraction of allocation and relocation pointers in a page-structured
1272 // space. 1272 // space.
1273 class AllocationInfo { 1273 class AllocationInfo {
1274 public: 1274 public:
1275 AllocationInfo() : top_(NULL), limit_(NULL) {} 1275 AllocationInfo() : top_(NULL), limit_(NULL) {}
1276 1276
1277 INLINE(void set_top(Address top)) { 1277 INLINE(void set_top(Address top)) {
1278 SLOW_DCHECK(top == NULL || 1278 SLOW_DCHECK(top == NULL ||
1279 (reinterpret_cast<intptr_t>(top) & HeapObjectTagMask()) == 0); 1279 (reinterpret_cast<intptr_t>(top) & kHeapObjectTagMask) == 0);
1280 top_ = top; 1280 top_ = top;
1281 } 1281 }
1282 1282
1283 INLINE(Address top()) const { 1283 INLINE(Address top()) const {
1284 SLOW_DCHECK(top_ == NULL || 1284 SLOW_DCHECK(top_ == NULL ||
1285 (reinterpret_cast<intptr_t>(top_) & HeapObjectTagMask()) == 0); 1285 (reinterpret_cast<intptr_t>(top_) & kHeapObjectTagMask) == 0);
1286 return top_; 1286 return top_;
1287 } 1287 }
1288 1288
1289 Address* top_address() { return &top_; } 1289 Address* top_address() { return &top_; }
1290 1290
1291 INLINE(void set_limit(Address limit)) { 1291 INLINE(void set_limit(Address limit)) {
1292 SLOW_DCHECK(limit == NULL || 1292 SLOW_DCHECK(limit == NULL ||
1293 (reinterpret_cast<intptr_t>(limit) & HeapObjectTagMask()) == 0); 1293 (reinterpret_cast<intptr_t>(limit) & kHeapObjectTagMask) == 0);
1294 limit_ = limit; 1294 limit_ = limit;
1295 } 1295 }
1296 1296
1297 INLINE(Address limit()) const { 1297 INLINE(Address limit()) const {
1298 SLOW_DCHECK(limit_ == NULL || 1298 SLOW_DCHECK(limit_ == NULL ||
1299 (reinterpret_cast<intptr_t>(limit_) & HeapObjectTagMask()) == 1299 (reinterpret_cast<intptr_t>(limit_) & kHeapObjectTagMask) ==
1300 0); 1300 0);
1301 return limit_; 1301 return limit_;
1302 } 1302 }
1303 1303
1304 Address* limit_address() { return &limit_; } 1304 Address* limit_address() { return &limit_; }
1305 1305
1306 #ifdef DEBUG 1306 #ifdef DEBUG
1307 bool VerifyPagedAllocation() { 1307 bool VerifyPagedAllocation() {
1308 return (Page::FromAllocationTop(top_) == Page::FromAllocationTop(limit_)) && 1308 return (Page::FromAllocationTop(top_) == Page::FromAllocationTop(limit_)) &&
1309 (top_ <= limit_); 1309 (top_ <= limit_);
(...skipping 1566 matching lines...) Expand 10 before | Expand all | Expand 10 after
2876 count = 0; 2876 count = 0;
2877 } 2877 }
2878 // Must be small, since an iteration is used for lookup. 2878 // Must be small, since an iteration is used for lookup.
2879 static const int kMaxComments = 64; 2879 static const int kMaxComments = 64;
2880 }; 2880 };
2881 #endif 2881 #endif
2882 } 2882 }
2883 } // namespace v8::internal 2883 } // namespace v8::internal
2884 2884
2885 #endif // V8_HEAP_SPACES_H_ 2885 #endif // V8_HEAP_SPACES_H_
OLDNEW
« no previous file with comments | « src/heap/heap.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698