Index: src/mark-compact.cc |
=================================================================== |
--- src/mark-compact.cc (revision 5368) |
+++ src/mark-compact.cc (working copy) |
@@ -85,11 +85,15 @@ |
GCTracer::Scope gc_scope(tracer_, GCTracer::Scope::MC_COMPACT); |
EncodeForwardingAddresses(); |
+ Heap::MarkMapPointersAsEncoded(true); |
UpdatePointers(); |
+ Heap::MarkMapPointersAsEncoded(false); |
+ PcToCodeCache::FlushPcToCodeCache(); |
RelocateObjects(); |
} else { |
SweepSpaces(); |
+ PcToCodeCache::FlushPcToCodeCache(); |
} |
Finish(); |
@@ -1185,8 +1189,6 @@ |
// pair of distinguished invalid map encodings (for single word and multiple |
// words) to indicate free regions in the page found during computation of |
// forwarding addresses and skipped over in subsequent sweeps. |
-static const uint32_t kSingleFreeEncoding = 0; |
-static const uint32_t kMultiFreeEncoding = 1; |
// Encode a free region, defined by the given start address and size, in the |
@@ -1194,10 +1196,10 @@ |
void EncodeFreeRegion(Address free_start, int free_size) { |
ASSERT(free_size >= kIntSize); |
if (free_size == kIntSize) { |
- Memory::uint32_at(free_start) = kSingleFreeEncoding; |
+ Memory::uint32_at(free_start) = MarkCompactCollector::kSingleFreeEncoding; |
} else { |
ASSERT(free_size >= 2 * kIntSize); |
- Memory::uint32_at(free_start) = kMultiFreeEncoding; |
+ Memory::uint32_at(free_start) = MarkCompactCollector::kMultiFreeEncoding; |
Memory::int_at(free_start + kIntSize) = free_size; |
} |