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

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

Issue 1176243015: Revert of Re-land new insertion write barrier. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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/incremental-marking-inl.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_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 490 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 progress_bar_ = progress_bar; 501 progress_bar_ = progress_bar;
502 } 502 }
503 503
504 void ResetProgressBar() { 504 void ResetProgressBar() {
505 if (IsFlagSet(MemoryChunk::HAS_PROGRESS_BAR)) { 505 if (IsFlagSet(MemoryChunk::HAS_PROGRESS_BAR)) {
506 set_progress_bar(0); 506 set_progress_bar(0);
507 ClearFlag(MemoryChunk::HAS_PROGRESS_BAR); 507 ClearFlag(MemoryChunk::HAS_PROGRESS_BAR);
508 } 508 }
509 } 509 }
510 510
511 bool IsLeftOfProgressBar(Object** slot) {
512 Address slot_address = reinterpret_cast<Address>(slot);
513 DCHECK(slot_address > this->address());
514 return (slot_address - (this->address() + kObjectStartOffset)) <
515 progress_bar();
516 }
517
511 static void IncrementLiveBytesFromGC(Address address, int by) { 518 static void IncrementLiveBytesFromGC(Address address, int by) {
512 MemoryChunk::FromAddress(address)->IncrementLiveBytes(by); 519 MemoryChunk::FromAddress(address)->IncrementLiveBytes(by);
513 } 520 }
514 521
515 static void IncrementLiveBytesFromMutator(Address address, int by); 522 static void IncrementLiveBytesFromMutator(Address address, int by);
516 523
517 static const intptr_t kAlignment = 524 static const intptr_t kAlignment =
518 (static_cast<uintptr_t>(1) << kPageSizeBits); 525 (static_cast<uintptr_t>(1) << kPageSizeBits);
519 526
520 static const intptr_t kAlignmentMask = kAlignment - 1; 527 static const intptr_t kAlignmentMask = kAlignment - 1;
(...skipping 2357 matching lines...) Expand 10 before | Expand all | Expand 10 after
2878 count = 0; 2885 count = 0;
2879 } 2886 }
2880 // Must be small, since an iteration is used for lookup. 2887 // Must be small, since an iteration is used for lookup.
2881 static const int kMaxComments = 64; 2888 static const int kMaxComments = 64;
2882 }; 2889 };
2883 #endif 2890 #endif
2884 } 2891 }
2885 } // namespace v8::internal 2892 } // namespace v8::internal
2886 2893
2887 #endif // V8_HEAP_SPACES_H_ 2894 #endif // V8_HEAP_SPACES_H_
OLDNEW
« no previous file with comments | « src/heap/incremental-marking-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698