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

Side by Side Diff: src/spaces.h

Issue 420293003: Rename failure tag to page owner tag and add proper description. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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/globals.h ('k') | no next file » | 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_SPACES_H_ 5 #ifndef V8_SPACES_H_
6 #define V8_SPACES_H_ 6 #define V8_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/platform/mutex.h" 10 #include "src/base/platform/mutex.h"
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 305
306 void set_next_chunk(MemoryChunk* next) { 306 void set_next_chunk(MemoryChunk* next) {
307 base::Release_Store(&next_chunk_, reinterpret_cast<base::AtomicWord>(next)); 307 base::Release_Store(&next_chunk_, reinterpret_cast<base::AtomicWord>(next));
308 } 308 }
309 309
310 void set_prev_chunk(MemoryChunk* prev) { 310 void set_prev_chunk(MemoryChunk* prev) {
311 base::Release_Store(&prev_chunk_, reinterpret_cast<base::AtomicWord>(prev)); 311 base::Release_Store(&prev_chunk_, reinterpret_cast<base::AtomicWord>(prev));
312 } 312 }
313 313
314 Space* owner() const { 314 Space* owner() const {
315 if ((reinterpret_cast<intptr_t>(owner_) & kFailureTagMask) == 315 if ((reinterpret_cast<intptr_t>(owner_) & kPageHeaderTagMask) ==
316 kFailureTag) { 316 kPageHeaderTag) {
317 return reinterpret_cast<Space*>(reinterpret_cast<intptr_t>(owner_) - 317 return reinterpret_cast<Space*>(reinterpret_cast<intptr_t>(owner_) -
318 kFailureTag); 318 kPageHeaderTag);
319 } else { 319 } else {
320 return NULL; 320 return NULL;
321 } 321 }
322 } 322 }
323 323
324 void set_owner(Space* space) { 324 void set_owner(Space* space) {
325 ASSERT((reinterpret_cast<intptr_t>(space) & kFailureTagMask) == 0); 325 ASSERT((reinterpret_cast<intptr_t>(space) & kPageHeaderTagMask) == 0);
326 owner_ = reinterpret_cast<Address>(space) + kFailureTag; 326 owner_ = reinterpret_cast<Address>(space) + kPageHeaderTag;
327 ASSERT((reinterpret_cast<intptr_t>(owner_) & kFailureTagMask) == 327 ASSERT((reinterpret_cast<intptr_t>(owner_) & kPageHeaderTagMask) ==
328 kFailureTag); 328 kPageHeaderTag);
329 } 329 }
330 330
331 base::VirtualMemory* reserved_memory() { 331 base::VirtualMemory* reserved_memory() {
332 return &reservation_; 332 return &reservation_;
333 } 333 }
334 334
335 void InitializeReservedMemory() { 335 void InitializeReservedMemory() {
336 reservation_.Reset(); 336 reservation_.Reset();
337 } 337 }
338 338
(...skipping 2688 matching lines...) Expand 10 before | Expand all | Expand 10 after
3027 } 3027 }
3028 // Must be small, since an iteration is used for lookup. 3028 // Must be small, since an iteration is used for lookup.
3029 static const int kMaxComments = 64; 3029 static const int kMaxComments = 64;
3030 }; 3030 };
3031 #endif 3031 #endif
3032 3032
3033 3033
3034 } } // namespace v8::internal 3034 } } // namespace v8::internal
3035 3035
3036 #endif // V8_SPACES_H_ 3036 #endif // V8_SPACES_H_
OLDNEW
« no previous file with comments | « src/globals.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698