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

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

Issue 2401653002: [turbofan] Discard the shared code entry in the optimized code map. (Closed)
Patch Set: Comments and REBASE. Created 4 years, 2 months 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/objects.h » ('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/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
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);
2837 } 2829 }
2838 2830
2839 set_detached_contexts(empty_fixed_array()); 2831 set_detached_contexts(empty_fixed_array());
2840 set_retained_maps(ArrayList::cast(empty_fixed_array())); 2832 set_retained_maps(ArrayList::cast(empty_fixed_array()));
2841 2833
2842 set_weak_object_to_code_table( 2834 set_weak_object_to_code_table(
2843 *WeakHashTable::New(isolate(), 16, USE_DEFAULT_MINIMUM_CAPACITY, 2835 *WeakHashTable::New(isolate(), 16, USE_DEFAULT_MINIMUM_CAPACITY,
2844 TENURED)); 2836 TENURED));
2845 2837
2846 set_weak_new_space_object_to_code_list( 2838 set_weak_new_space_object_to_code_list(
(...skipping 3671 matching lines...) Expand 10 before | Expand all | Expand 10 after
6518 } 6510 }
6519 6511
6520 6512
6521 // static 6513 // static
6522 int Heap::GetStaticVisitorIdForMap(Map* map) { 6514 int Heap::GetStaticVisitorIdForMap(Map* map) {
6523 return StaticVisitorBase::GetVisitorId(map); 6515 return StaticVisitorBase::GetVisitorId(map);
6524 } 6516 }
6525 6517
6526 } // namespace internal 6518 } // namespace internal
6527 } // namespace v8 6519 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/heap.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698