Chromium Code Reviews| Index: src/incremental-marking.cc |
| diff --git a/src/incremental-marking.cc b/src/incremental-marking.cc |
| index dd54c630733f9c74905dcd7928641e9f9e0fb2f7..5ef3a14372f39cf59827b313eb1d5e536f7287ab 100644 |
| --- a/src/incremental-marking.cc |
| +++ b/src/incremental-marking.cc |
| @@ -677,11 +677,15 @@ void IncrementalMarking::Hurry() { |
| Object* context = heap_->global_contexts_list(); |
| while (!context->IsUndefined()) { |
| - NormalizedMapCache* cache = Context::cast(context)->normalized_map_cache(); |
| - MarkBit mark_bit = Marking::MarkBitFrom(cache); |
| - if (Marking::IsGrey(mark_bit)) { |
| - Marking::GreyToBlack(mark_bit); |
| - MemoryChunk::IncrementLiveBytes(cache->address(), cache->Size()); |
| + int index = Context::NORMALIZED_MAP_CACHE_INDEX; |
|
Vyacheslav Egorov (Chromium)
2011/12/13 12:26:20
I don't think we need separate index variable.
ulan
2011/12/13 13:02:58
Done.
|
| + Object* cache_or_undefined = Context::cast(context)->get(index); |
| + if (!cache_or_undefined->IsUndefined()) { |
|
Vyacheslav Egorov (Chromium)
2011/12/13 12:26:20
Please comment why can it be undefined.
ulan
2011/12/13 13:02:58
Done.
|
| + NormalizedMapCache* cache = NormalizedMapCache::cast(cache_or_undefined); |
|
Vyacheslav Egorov (Chromium)
2011/12/13 12:26:20
you don't need a separate cache variable. just mak
ulan
2011/12/13 13:02:58
Done.
|
| + MarkBit mark_bit = Marking::MarkBitFrom(cache); |
| + if (Marking::IsGrey(mark_bit)) { |
| + Marking::GreyToBlack(mark_bit); |
| + MemoryChunk::IncrementLiveBytes(cache->address(), cache->Size()); |
| + } |
| } |
| context = Context::cast(context)->get(Context::NEXT_CONTEXT_LINK); |
| } |