| 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/heap.h" | 5 #include "src/heap/heap.h" |
| 6 | 6 |
| 7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
| 8 #include "src/api.h" | 8 #include "src/api.h" |
| 9 #include "src/ast/context-slot-cache.h" | 9 #include "src/ast/context-slot-cache.h" |
| 10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
| (...skipping 1446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1457 | 1457 |
| 1458 // We finished a marking cycle. We can uncommit the marking deque until | 1458 // We finished a marking cycle. We can uncommit the marking deque until |
| 1459 // we start marking again. | 1459 // we start marking again. |
| 1460 mark_compact_collector()->marking_deque()->Uninitialize(); | 1460 mark_compact_collector()->marking_deque()->Uninitialize(); |
| 1461 mark_compact_collector()->EnsureMarkingDequeIsCommitted( | 1461 mark_compact_collector()->EnsureMarkingDequeIsCommitted( |
| 1462 MarkCompactCollector::kMinMarkingDequeSize); | 1462 MarkCompactCollector::kMinMarkingDequeSize); |
| 1463 } | 1463 } |
| 1464 | 1464 |
| 1465 | 1465 |
| 1466 void Heap::MarkCompactPrologue() { | 1466 void Heap::MarkCompactPrologue() { |
| 1467 // At any old GC clear the keyed lookup cache to enable collection of unused | |
| 1468 // maps. | |
| 1469 isolate_->keyed_lookup_cache()->Clear(); | |
| 1470 isolate_->context_slot_cache()->Clear(); | 1467 isolate_->context_slot_cache()->Clear(); |
| 1471 isolate_->descriptor_lookup_cache()->Clear(); | 1468 isolate_->descriptor_lookup_cache()->Clear(); |
| 1472 RegExpResultsCache::Clear(string_split_cache()); | 1469 RegExpResultsCache::Clear(string_split_cache()); |
| 1473 RegExpResultsCache::Clear(regexp_multiple_cache()); | 1470 RegExpResultsCache::Clear(regexp_multiple_cache()); |
| 1474 | 1471 |
| 1475 isolate_->compilation_cache()->MarkCompactPrologue(); | 1472 isolate_->compilation_cache()->MarkCompactPrologue(); |
| 1476 | 1473 |
| 1477 CompletelyClearInstanceofCache(); | 1474 CompletelyClearInstanceofCache(); |
| 1478 | 1475 |
| 1479 FlushNumberStringCache(); | 1476 FlushNumberStringCache(); |
| (...skipping 1400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2880 cell = factory->NewPropertyCell(); | 2877 cell = factory->NewPropertyCell(); |
| 2881 cell->set_value(Smi::FromInt(Isolate::kArrayProtectorValid)); | 2878 cell->set_value(Smi::FromInt(Isolate::kArrayProtectorValid)); |
| 2882 set_string_length_protector(*cell); | 2879 set_string_length_protector(*cell); |
| 2883 | 2880 |
| 2884 set_serialized_templates(empty_fixed_array()); | 2881 set_serialized_templates(empty_fixed_array()); |
| 2885 | 2882 |
| 2886 set_weak_stack_trace_list(Smi::kZero); | 2883 set_weak_stack_trace_list(Smi::kZero); |
| 2887 | 2884 |
| 2888 set_noscript_shared_function_infos(Smi::kZero); | 2885 set_noscript_shared_function_infos(Smi::kZero); |
| 2889 | 2886 |
| 2890 // Initialize keyed lookup cache. | |
| 2891 isolate_->keyed_lookup_cache()->Clear(); | |
| 2892 | |
| 2893 // Initialize context slot cache. | 2887 // Initialize context slot cache. |
| 2894 isolate_->context_slot_cache()->Clear(); | 2888 isolate_->context_slot_cache()->Clear(); |
| 2895 | 2889 |
| 2896 // Initialize descriptor cache. | 2890 // Initialize descriptor cache. |
| 2897 isolate_->descriptor_lookup_cache()->Clear(); | 2891 isolate_->descriptor_lookup_cache()->Clear(); |
| 2898 | 2892 |
| 2899 // Initialize compilation cache. | 2893 // Initialize compilation cache. |
| 2900 isolate_->compilation_cache()->Clear(); | 2894 isolate_->compilation_cache()->Clear(); |
| 2901 } | 2895 } |
| 2902 | 2896 |
| (...skipping 3600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6503 } | 6497 } |
| 6504 | 6498 |
| 6505 | 6499 |
| 6506 // static | 6500 // static |
| 6507 int Heap::GetStaticVisitorIdForMap(Map* map) { | 6501 int Heap::GetStaticVisitorIdForMap(Map* map) { |
| 6508 return StaticVisitorBase::GetVisitorId(map); | 6502 return StaticVisitorBase::GetVisitorId(map); |
| 6509 } | 6503 } |
| 6510 | 6504 |
| 6511 } // namespace internal | 6505 } // namespace internal |
| 6512 } // namespace v8 | 6506 } // namespace v8 |
| OLD | NEW |