| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/heap/mark-compact.h" | 5 #include "src/heap/mark-compact.h" |
| 6 | 6 |
| 7 #include "src/base/atomicops.h" | 7 #include "src/base/atomicops.h" |
| 8 #include "src/base/bits.h" | 8 #include "src/base/bits.h" |
| 9 #include "src/base/sys-info.h" | 9 #include "src/base/sys-info.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 2353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2364 | 2364 |
| 2365 // Prune the string table removing all strings only pointed to by the | 2365 // Prune the string table removing all strings only pointed to by the |
| 2366 // string table. Cannot use string_table() here because the string | 2366 // string table. Cannot use string_table() here because the string |
| 2367 // table is marked. | 2367 // table is marked. |
| 2368 StringTable* string_table = heap()->string_table(); | 2368 StringTable* string_table = heap()->string_table(); |
| 2369 InternalizedStringTableCleaner internalized_visitor(heap(), string_table); | 2369 InternalizedStringTableCleaner internalized_visitor(heap(), string_table); |
| 2370 string_table->IterateElements(&internalized_visitor); | 2370 string_table->IterateElements(&internalized_visitor); |
| 2371 string_table->ElementsRemoved(internalized_visitor.PointersRemoved()); | 2371 string_table->ElementsRemoved(internalized_visitor.PointersRemoved()); |
| 2372 | 2372 |
| 2373 ExternalStringTableCleaner external_visitor(heap(), nullptr); | 2373 ExternalStringTableCleaner external_visitor(heap(), nullptr); |
| 2374 heap()->external_string_table_.Iterate(&external_visitor); | 2374 heap()->external_string_table_.IterateAll(&external_visitor); |
| 2375 heap()->external_string_table_.CleanUp(); | 2375 heap()->external_string_table_.CleanUpAll(); |
| 2376 } | 2376 } |
| 2377 | 2377 |
| 2378 { | 2378 { |
| 2379 TRACE_GC(heap()->tracer(), GCTracer::Scope::MC_CLEAR_WEAK_LISTS); | 2379 TRACE_GC(heap()->tracer(), GCTracer::Scope::MC_CLEAR_WEAK_LISTS); |
| 2380 // Process the weak references. | 2380 // Process the weak references. |
| 2381 MarkCompactWeakObjectRetainer mark_compact_object_retainer; | 2381 MarkCompactWeakObjectRetainer mark_compact_object_retainer; |
| 2382 heap()->ProcessAllWeakReferences(&mark_compact_object_retainer); | 2382 heap()->ProcessAllWeakReferences(&mark_compact_object_retainer); |
| 2383 } | 2383 } |
| 2384 | 2384 |
| 2385 { | 2385 { |
| (...skipping 1549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3935 // The target is always in old space, we don't have to record the slot in | 3935 // The target is always in old space, we don't have to record the slot in |
| 3936 // the old-to-new remembered set. | 3936 // the old-to-new remembered set. |
| 3937 DCHECK(!heap()->InNewSpace(target)); | 3937 DCHECK(!heap()->InNewSpace(target)); |
| 3938 RecordRelocSlot(host, &rinfo, target); | 3938 RecordRelocSlot(host, &rinfo, target); |
| 3939 } | 3939 } |
| 3940 } | 3940 } |
| 3941 } | 3941 } |
| 3942 | 3942 |
| 3943 } // namespace internal | 3943 } // namespace internal |
| 3944 } // namespace v8 | 3944 } // namespace v8 |
| OLD | NEW |