Index: src/incremental-marking-inl.h |
diff --git a/src/incremental-marking-inl.h b/src/incremental-marking-inl.h |
index 5ce003f31d4c0d27e81a66df22ad269f11810ca4..2dae6f207d0a3904408c052e791e638d6ebf7f4f 100644 |
--- a/src/incremental-marking-inl.h |
+++ b/src/incremental-marking-inl.h |
@@ -1,4 +1,4 @@ |
-// Copyright 2011 the V8 project authors. All rights reserved. |
+// Copyright 2012 the V8 project authors. All rights reserved. |
// Redistribution and use in source and binary forms, with or without |
// modification, are permitted provided that the following conditions are |
// met: |
@@ -118,13 +118,29 @@ void IncrementalMarking::BlackToGreyAndUnshift(HeapObject* obj, |
void IncrementalMarking::WhiteToGreyAndPush(HeapObject* obj, MarkBit mark_bit) { |
- WhiteToGrey(obj, mark_bit); |
+ Marking::WhiteToGrey(mark_bit); |
marking_deque_.PushGrey(obj); |
} |
-void IncrementalMarking::WhiteToGrey(HeapObject* obj, MarkBit mark_bit) { |
- Marking::WhiteToGrey(mark_bit); |
+bool IncrementalMarking::MarkObjectAndPush(HeapObject* obj) { |
+ MarkBit mark_bit = Marking::MarkBitFrom(obj); |
+ if (!mark_bit.Get()) { |
+ WhiteToGreyAndPush(obj, mark_bit); |
+ return true; |
+ } |
+ return false; |
+} |
+ |
+ |
+bool IncrementalMarking::MarkObjectWithoutPush(HeapObject* obj) { |
+ MarkBit mark_bit = Marking::MarkBitFrom(obj); |
+ if (!mark_bit.Get()) { |
+ mark_bit.Set(); |
+ MemoryChunk::IncrementLiveBytesFromGC(obj->address(), obj->Size()); |
+ return true; |
+ } |
+ return false; |
} |