Chromium Code Reviews| Index: src/incremental-marking-inl.h |
| diff --git a/src/incremental-marking-inl.h b/src/incremental-marking-inl.h |
| index 5ce003f31d4c0d27e81a66df22ad269f11810ca4..11f76eac770b466acd7363ba7da5ad11bcaf58a0 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: |
| @@ -128,6 +128,28 @@ void IncrementalMarking::WhiteToGrey(HeapObject* obj, MarkBit mark_bit) { |
| } |
| +bool IncrementalMarking::MarkObject(HeapObject* obj) { |
|
Vyacheslav Egorov (Chromium)
2012/05/11 12:58:35
I suggest naming it MarkObjectAndPush
Michael Starzinger
2012/05/11 14:51:53
Done.
|
| + MarkBit mark_bit = Marking::MarkBitFrom(obj); |
| + if (!mark_bit.Get()) { |
| + WhiteToGreyAndPush(obj, mark_bit); |
| + MemoryChunk::IncrementLiveBytesFromGC(obj->address(), obj->Size()); |
| + return true; |
| + } |
| + return false; |
| +} |
| + |
| + |
| +bool IncrementalMarking::MarkObjectWithoutPush(HeapObject* obj) { |
| + MarkBit mark_bit = Marking::MarkBitFrom(obj); |
| + if (!mark_bit.Get()) { |
| + MarkBlackOrKeepGrey(mark_bit); |
|
Vyacheslav Egorov (Chromium)
2012/05/11 12:58:35
Can it be grey at this point? I don't think so.
Michael Starzinger
2012/05/11 14:51:53
Done, inlined mark bit setting.
|
| + MemoryChunk::IncrementLiveBytesFromGC(obj->address(), obj->Size()); |
| + return true; |
| + } |
| + return false; |
| +} |
| + |
| + |
| } } // namespace v8::internal |
| #endif // V8_INCREMENTAL_MARKING_INL_H_ |