Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(193)

Side by Side Diff: src/heap/heap.cc

Issue 1433923002: Maintain a FixedArray for the optimized code map. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE. Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/heap/heap.h ('k') | src/heap/mark-compact.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/base/once.h" 10 #include "src/base/once.h"
(...skipping 2746 matching lines...) Expand 10 before | Expand all | Expand 10 after
2757 2757
2758 Object* megamorphic = *TypeFeedbackVector::MegamorphicSentinel(isolate()); 2758 Object* megamorphic = *TypeFeedbackVector::MegamorphicSentinel(isolate());
2759 dummy_vector->Set(load_ic_slot, megamorphic, SKIP_WRITE_BARRIER); 2759 dummy_vector->Set(load_ic_slot, megamorphic, SKIP_WRITE_BARRIER);
2760 dummy_vector->Set(keyed_load_ic_slot, megamorphic, SKIP_WRITE_BARRIER); 2760 dummy_vector->Set(keyed_load_ic_slot, megamorphic, SKIP_WRITE_BARRIER);
2761 dummy_vector->Set(store_ic_slot, megamorphic, SKIP_WRITE_BARRIER); 2761 dummy_vector->Set(store_ic_slot, megamorphic, SKIP_WRITE_BARRIER);
2762 dummy_vector->Set(keyed_store_ic_slot, megamorphic, SKIP_WRITE_BARRIER); 2762 dummy_vector->Set(keyed_store_ic_slot, megamorphic, SKIP_WRITE_BARRIER);
2763 2763
2764 set_dummy_vector(*dummy_vector); 2764 set_dummy_vector(*dummy_vector);
2765 } 2765 }
2766 2766
2767 {
2768 Handle<FixedArray> cleared_optimized_code_map =
2769 factory->NewFixedArray(SharedFunctionInfo::kEntriesStart, TENURED);
2770 STATIC_ASSERT(SharedFunctionInfo::kEntriesStart == 1 &&
2771 SharedFunctionInfo::kSharedCodeIndex == 0);
2772 set_cleared_optimized_code_map(*cleared_optimized_code_map);
2773 }
2774
2767 set_detached_contexts(empty_fixed_array()); 2775 set_detached_contexts(empty_fixed_array());
2768 set_retained_maps(ArrayList::cast(empty_fixed_array())); 2776 set_retained_maps(ArrayList::cast(empty_fixed_array()));
2769 2777
2770 set_weak_object_to_code_table( 2778 set_weak_object_to_code_table(
2771 *WeakHashTable::New(isolate(), 16, USE_DEFAULT_MINIMUM_CAPACITY, 2779 *WeakHashTable::New(isolate(), 16, USE_DEFAULT_MINIMUM_CAPACITY,
2772 TENURED)); 2780 TENURED));
2773 2781
2774 set_script_list(Smi::FromInt(0)); 2782 set_script_list(Smi::FromInt(0));
2775 2783
2776 Handle<SeededNumberDictionary> slow_element_dictionary = 2784 Handle<SeededNumberDictionary> slow_element_dictionary =
(...skipping 3374 matching lines...) Expand 10 before | Expand all | Expand 10 after
6151 } 6159 }
6152 6160
6153 6161
6154 // static 6162 // static
6155 int Heap::GetStaticVisitorIdForMap(Map* map) { 6163 int Heap::GetStaticVisitorIdForMap(Map* map) {
6156 return StaticVisitorBase::GetVisitorId(map); 6164 return StaticVisitorBase::GetVisitorId(map);
6157 } 6165 }
6158 6166
6159 } // namespace internal 6167 } // namespace internal
6160 } // namespace v8 6168 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/heap.h ('k') | src/heap/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698