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

Unified Diff: src/incremental-marking.h

Issue 6824078: Move most of the incremental marking write barrier to generated code. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: '' Created 9 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: src/incremental-marking.h
===================================================================
--- src/incremental-marking.h (revision 7619)
+++ src/incremental-marking.h (working copy)
@@ -129,24 +129,32 @@
}
// Impossible markbits: 01
+ static const char* kImpossibleBitPattern;
static inline bool IsImpossible(MarkBit mark_bit) {
+ ASSERT(strcmp(kImpossibleBitPattern, "01") == 0);
return !mark_bit.Get() && mark_bit.Next().Get();
}
// Black markbits: 10 - this is required by the sweeper.
+ static const char* kBlackBitPattern;
static inline bool IsBlack(MarkBit mark_bit) {
+ ASSERT(strcmp(kBlackBitPattern, "10") == 0);
ASSERT(!IsImpossible(mark_bit));
return mark_bit.Get() && !mark_bit.Next().Get();
}
// White markbits: 00 - this is required by the mark bit clearer.
+ static const char* kWhiteBitPattern;
static inline bool IsWhite(MarkBit mark_bit) {
+ ASSERT(strcmp(kWhiteBitPattern, "00") == 0);
ASSERT(!IsImpossible(mark_bit));
return !mark_bit.Get();
}
// Grey markbits: 11
+ static const char* kGreyBitPattern;
static inline bool IsGrey(MarkBit mark_bit) {
+ ASSERT(strcmp(kGreyBitPattern, "11") == 0);
ASSERT(!IsImpossible(mark_bit));
return mark_bit.Get() && mark_bit.Next().Get();
}

Powered by Google App Engine
This is Rietveld 408576698