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