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

Unified Diff: src/mark-compact.h

Issue 8256012: Remove some asserts to speed up debug mode. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 2 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
« no previous file with comments | « src/incremental-marking-inl.h ('k') | src/mark-compact-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mark-compact.h
===================================================================
--- src/mark-compact.h (revision 9581)
+++ src/mark-compact.h (working copy)
@@ -61,68 +61,52 @@
// 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();
}
static inline void MarkBlack(MarkBit mark_bit) {
mark_bit.Set();
mark_bit.Next().Clear();
- ASSERT(Marking::IsBlack(mark_bit));
}
static inline void BlackToGrey(MarkBit markbit) {
- ASSERT(IsBlack(markbit));
markbit.Next().Set();
- ASSERT(IsGrey(markbit));
}
static inline void WhiteToGrey(MarkBit markbit) {
- ASSERT(IsWhite(markbit));
markbit.Set();
markbit.Next().Set();
- ASSERT(IsGrey(markbit));
}
static inline void GreyToBlack(MarkBit markbit) {
- ASSERT(IsGrey(markbit));
markbit.Next().Clear();
- ASSERT(IsBlack(markbit));
}
static inline void BlackToGrey(HeapObject* obj) {
- ASSERT(obj->Size() >= 2 * kPointerSize);
BlackToGrey(MarkBitFrom(obj));
}
static inline void AnyToGrey(MarkBit markbit) {
markbit.Set();
markbit.Next().Set();
- ASSERT(IsGrey(markbit));
}
// Returns true if the the object whose mark is transferred is marked black.
@@ -173,8 +157,6 @@
to_mark_bit.Next().Set();
is_black = false; // Was actually gray.
}
- ASSERT(Color(from) == Color(to));
- ASSERT(is_black == (Color(to) == BLACK_OBJECT));
return is_black;
}
@@ -227,7 +209,6 @@
inline void PushGrey(HeapObject* object) {
ASSERT(object->IsHeapObject());
if (IsFull()) {
- ASSERT(Marking::IsGrey(Marking::MarkBitFrom(object)));
SetOverflowed();
} else {
array_[top_] = object;
@@ -246,7 +227,6 @@
inline void UnshiftGrey(HeapObject* object) {
ASSERT(object->IsHeapObject());
if (IsFull()) {
- ASSERT(Marking::IsGrey(Marking::MarkBitFrom(object)));
SetOverflowed();
} else {
bottom_ = ((bottom_ - 1) & mask_);
« no previous file with comments | « src/incremental-marking-inl.h ('k') | src/mark-compact-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698