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/scopeinfo.h" | 9 #include "src/ast/scopeinfo.h" |
10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
(...skipping 2762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2773 Object* megamorphic = *TypeFeedbackVector::MegamorphicSentinel(isolate()); | 2773 Object* megamorphic = *TypeFeedbackVector::MegamorphicSentinel(isolate()); |
2774 dummy_vector->Set(load_ic_slot, megamorphic, SKIP_WRITE_BARRIER); | 2774 dummy_vector->Set(load_ic_slot, megamorphic, SKIP_WRITE_BARRIER); |
2775 dummy_vector->Set(keyed_load_ic_slot, megamorphic, SKIP_WRITE_BARRIER); | 2775 dummy_vector->Set(keyed_load_ic_slot, megamorphic, SKIP_WRITE_BARRIER); |
2776 dummy_vector->Set(store_ic_slot, megamorphic, SKIP_WRITE_BARRIER); | 2776 dummy_vector->Set(store_ic_slot, megamorphic, SKIP_WRITE_BARRIER); |
2777 dummy_vector->Set(keyed_store_ic_slot, megamorphic, SKIP_WRITE_BARRIER); | 2777 dummy_vector->Set(keyed_store_ic_slot, megamorphic, SKIP_WRITE_BARRIER); |
2778 | 2778 |
2779 set_dummy_vector(*dummy_vector); | 2779 set_dummy_vector(*dummy_vector); |
2780 } | 2780 } |
2781 | 2781 |
2782 { | 2782 { |
| 2783 Handle<WeakCell> cell = factory->NewWeakCell(factory->undefined_value()); |
| 2784 set_empty_weak_cell(*cell); |
| 2785 cell->clear(); |
| 2786 |
2783 Handle<FixedArray> cleared_optimized_code_map = | 2787 Handle<FixedArray> cleared_optimized_code_map = |
2784 factory->NewFixedArray(SharedFunctionInfo::kEntriesStart, TENURED); | 2788 factory->NewFixedArray(SharedFunctionInfo::kEntriesStart, TENURED); |
| 2789 cleared_optimized_code_map->set(SharedFunctionInfo::kSharedCodeIndex, |
| 2790 *cell); |
2785 STATIC_ASSERT(SharedFunctionInfo::kEntriesStart == 1 && | 2791 STATIC_ASSERT(SharedFunctionInfo::kEntriesStart == 1 && |
2786 SharedFunctionInfo::kSharedCodeIndex == 0); | 2792 SharedFunctionInfo::kSharedCodeIndex == 0); |
2787 set_cleared_optimized_code_map(*cleared_optimized_code_map); | 2793 set_cleared_optimized_code_map(*cleared_optimized_code_map); |
2788 } | 2794 } |
2789 | 2795 |
2790 set_detached_contexts(empty_fixed_array()); | 2796 set_detached_contexts(empty_fixed_array()); |
2791 set_retained_maps(ArrayList::cast(empty_fixed_array())); | 2797 set_retained_maps(ArrayList::cast(empty_fixed_array())); |
2792 | 2798 |
2793 set_weak_object_to_code_table( | 2799 set_weak_object_to_code_table( |
2794 *WeakHashTable::New(isolate(), 16, USE_DEFAULT_MINIMUM_CAPACITY, | 2800 *WeakHashTable::New(isolate(), 16, USE_DEFAULT_MINIMUM_CAPACITY, |
(...skipping 3323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6118 } | 6124 } |
6119 | 6125 |
6120 | 6126 |
6121 // static | 6127 // static |
6122 int Heap::GetStaticVisitorIdForMap(Map* map) { | 6128 int Heap::GetStaticVisitorIdForMap(Map* map) { |
6123 return StaticVisitorBase::GetVisitorId(map); | 6129 return StaticVisitorBase::GetVisitorId(map); |
6124 } | 6130 } |
6125 | 6131 |
6126 } // namespace internal | 6132 } // namespace internal |
6127 } // namespace v8 | 6133 } // namespace v8 |
OLD | NEW |