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

Unified Diff: src/spaces.h

Issue 8537014: Simplify the write barrier. Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 1 month 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/mark-compact-inl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/spaces.h
===================================================================
--- src/spaces.h (revision 9979)
+++ src/spaces.h (working copy)
@@ -124,8 +124,8 @@
public:
typedef uint32_t CellType;
- inline MarkBit(CellType* cell, CellType mask, bool data_only)
- : cell_(cell), mask_(mask), data_only_(data_only) { }
+ inline MarkBit(CellType* cell, CellType mask)
+ : cell_(cell), mask_(mask) { }
inline CellType* cell() { return cell_; }
inline CellType mask() { return mask_; }
@@ -140,25 +140,18 @@
inline bool Get() { return (*cell_ & mask_) != 0; }
inline void Clear() { *cell_ &= ~mask_; }
- inline bool data_only() { return data_only_; }
-
inline MarkBit Next() {
CellType new_mask = mask_ << 1;
if (new_mask == 0) {
- return MarkBit(cell_ + 1, 1, data_only_);
+ return MarkBit(cell_ + 1, 1);
} else {
- return MarkBit(cell_, new_mask, data_only_);
+ return MarkBit(cell_, new_mask);
}
}
private:
CellType* cell_;
CellType mask_;
- // This boolean indicates that the object is in a data-only space with no
- // pointers. This enables some optimizations when marking.
- // It is expected that this field is inlined and turned into control flow
- // at the place where the MarkBit object is created.
- bool data_only_;
};
@@ -214,10 +207,10 @@
return reinterpret_cast<Bitmap*>(addr);
}
- inline MarkBit MarkBitFromIndex(uint32_t index, bool data_only = false) {
+ inline MarkBit MarkBitFromIndex(uint32_t index) {
MarkBit::CellType mask = 1 << (index & kBitIndexMask);
MarkBit::CellType* cell = this->cells() + (index >> kBitsPerCellLog2);
- return MarkBit(cell, mask, data_only);
+ return MarkBit(cell, mask);
}
static inline void Clear(MemoryChunk* chunk);
« no previous file with comments | « src/mark-compact-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698