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 2808 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2819 Handle<FixedArray> empty_sloppy_arguments_elements = | 2819 Handle<FixedArray> empty_sloppy_arguments_elements = |
2820 factory->NewFixedArray(2, TENURED); | 2820 factory->NewFixedArray(2, TENURED); |
2821 empty_sloppy_arguments_elements->set_map(sloppy_arguments_elements_map()); | 2821 empty_sloppy_arguments_elements->set_map(sloppy_arguments_elements_map()); |
2822 set_empty_sloppy_arguments_elements(*empty_sloppy_arguments_elements); | 2822 set_empty_sloppy_arguments_elements(*empty_sloppy_arguments_elements); |
2823 } | 2823 } |
2824 | 2824 |
2825 { | 2825 { |
2826 Handle<WeakCell> cell = factory->NewWeakCell(factory->undefined_value()); | 2826 Handle<WeakCell> cell = factory->NewWeakCell(factory->undefined_value()); |
2827 set_empty_weak_cell(*cell); | 2827 set_empty_weak_cell(*cell); |
2828 cell->clear(); | 2828 cell->clear(); |
| 2829 |
| 2830 Handle<FixedArray> cleared_optimized_code_map = |
| 2831 factory->NewFixedArray(SharedFunctionInfo::kEntriesStart, TENURED); |
| 2832 cleared_optimized_code_map->set(SharedFunctionInfo::kSharedCodeIndex, |
| 2833 *cell); |
| 2834 STATIC_ASSERT(SharedFunctionInfo::kEntriesStart == 1 && |
| 2835 SharedFunctionInfo::kSharedCodeIndex == 0); |
| 2836 set_cleared_optimized_code_map(*cleared_optimized_code_map); |
2829 } | 2837 } |
2830 | 2838 |
2831 set_detached_contexts(empty_fixed_array()); | 2839 set_detached_contexts(empty_fixed_array()); |
2832 set_retained_maps(ArrayList::cast(empty_fixed_array())); | 2840 set_retained_maps(ArrayList::cast(empty_fixed_array())); |
2833 | 2841 |
2834 set_weak_object_to_code_table( | 2842 set_weak_object_to_code_table( |
2835 *WeakHashTable::New(isolate(), 16, USE_DEFAULT_MINIMUM_CAPACITY, | 2843 *WeakHashTable::New(isolate(), 16, USE_DEFAULT_MINIMUM_CAPACITY, |
2836 TENURED)); | 2844 TENURED)); |
2837 | 2845 |
2838 set_weak_new_space_object_to_code_list( | 2846 set_weak_new_space_object_to_code_list( |
(...skipping 3671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6510 } | 6518 } |
6511 | 6519 |
6512 | 6520 |
6513 // static | 6521 // static |
6514 int Heap::GetStaticVisitorIdForMap(Map* map) { | 6522 int Heap::GetStaticVisitorIdForMap(Map* map) { |
6515 return StaticVisitorBase::GetVisitorId(map); | 6523 return StaticVisitorBase::GetVisitorId(map); |
6516 } | 6524 } |
6517 | 6525 |
6518 } // namespace internal | 6526 } // namespace internal |
6519 } // namespace v8 | 6527 } // namespace v8 |
OLD | NEW |