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

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

Issue 1073953006: New insertion write barrier. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
« 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
518 static void IncrementLiveBytesFromGC(Address address, int by) { 511 static void IncrementLiveBytesFromGC(Address address, int by) {
519 MemoryChunk::FromAddress(address)->IncrementLiveBytes(by); 512 MemoryChunk::FromAddress(address)->IncrementLiveBytes(by);
520 } 513 }
521 514
522 static void IncrementLiveBytesFromMutator(Address address, int by); 515 static void IncrementLiveBytesFromMutator(Address address, int by);
523 516
524 static const intptr_t kAlignment = 517 static const intptr_t kAlignment =
525 (static_cast<uintptr_t>(1) << kPageSizeBits); 518 (static_cast<uintptr_t>(1) << kPageSizeBits);
526 519
527 static const intptr_t kAlignmentMask = kAlignment - 1; 520 static const intptr_t kAlignmentMask = kAlignment - 1;
(...skipping 2332 matching lines...) Expand 10 before | Expand all | Expand 10 after
2860 count = 0; 2853 count = 0;
2861 } 2854 }
2862 // Must be small, since an iteration is used for lookup. 2855 // Must be small, since an iteration is used for lookup.
2863 static const int kMaxComments = 64; 2856 static const int kMaxComments = 64;
2864 }; 2857 };
2865 #endif 2858 #endif
2866 } 2859 }
2867 } // namespace v8::internal 2860 } // namespace v8::internal
2868 2861
2869 #endif // V8_HEAP_SPACES_H_ 2862 #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