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

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

Issue 2680313002: Count closures using the feedback vector cell map, specialize if count==1. (Closed)
Patch Set: Only specialize if compiling from bytecode Created 3 years, 10 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.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/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 2315 matching lines...) Expand 10 before | Expand all | Expand 10 after
2326 TYPED_ARRAYS(ALLOCATE_FIXED_TYPED_ARRAY_MAP) 2326 TYPED_ARRAYS(ALLOCATE_FIXED_TYPED_ARRAY_MAP)
2327 #undef ALLOCATE_FIXED_TYPED_ARRAY_MAP 2327 #undef ALLOCATE_FIXED_TYPED_ARRAY_MAP
2328 2328
2329 ALLOCATE_VARSIZE_MAP(FIXED_ARRAY_TYPE, sloppy_arguments_elements) 2329 ALLOCATE_VARSIZE_MAP(FIXED_ARRAY_TYPE, sloppy_arguments_elements)
2330 2330
2331 ALLOCATE_VARSIZE_MAP(CODE_TYPE, code) 2331 ALLOCATE_VARSIZE_MAP(CODE_TYPE, code)
2332 2332
2333 ALLOCATE_MAP(CELL_TYPE, Cell::kSize, cell) 2333 ALLOCATE_MAP(CELL_TYPE, Cell::kSize, cell)
2334 ALLOCATE_MAP(PROPERTY_CELL_TYPE, PropertyCell::kSize, global_property_cell) 2334 ALLOCATE_MAP(PROPERTY_CELL_TYPE, PropertyCell::kSize, global_property_cell)
2335 ALLOCATE_MAP(WEAK_CELL_TYPE, WeakCell::kSize, weak_cell) 2335 ALLOCATE_MAP(WEAK_CELL_TYPE, WeakCell::kSize, weak_cell)
2336 ALLOCATE_MAP(CELL_TYPE, Cell::kSize, no_closures_cell)
2337 ALLOCATE_MAP(CELL_TYPE, Cell::kSize, one_closure_cell)
2338 ALLOCATE_MAP(CELL_TYPE, Cell::kSize, many_closures_cell)
2336 ALLOCATE_MAP(FILLER_TYPE, kPointerSize, one_pointer_filler) 2339 ALLOCATE_MAP(FILLER_TYPE, kPointerSize, one_pointer_filler)
2337 ALLOCATE_MAP(FILLER_TYPE, 2 * kPointerSize, two_pointer_filler) 2340 ALLOCATE_MAP(FILLER_TYPE, 2 * kPointerSize, two_pointer_filler)
2338 2341
2339 ALLOCATE_VARSIZE_MAP(TRANSITION_ARRAY_TYPE, transition_array) 2342 ALLOCATE_VARSIZE_MAP(TRANSITION_ARRAY_TYPE, transition_array)
2340 2343
2341 for (unsigned i = 0; i < arraysize(struct_table); i++) { 2344 for (unsigned i = 0; i < arraysize(struct_table); i++) {
2342 const StructTable& entry = struct_table[i]; 2345 const StructTable& entry = struct_table[i];
2343 Map* map; 2346 Map* map;
2344 if (!AllocateMap(entry.type, entry.size).To(&map)) return false; 2347 if (!AllocateMap(entry.type, entry.size).To(&map)) return false;
2345 roots_[entry.index] = map; 2348 roots_[entry.index] = map;
(...skipping 4207 matching lines...) Expand 10 before | Expand all | Expand 10 after
6553 } 6556 }
6554 6557
6555 6558
6556 // static 6559 // static
6557 int Heap::GetStaticVisitorIdForMap(Map* map) { 6560 int Heap::GetStaticVisitorIdForMap(Map* map) {
6558 return StaticVisitorBase::GetVisitorId(map); 6561 return StaticVisitorBase::GetVisitorId(map);
6559 } 6562 }
6560 6563
6561 } // namespace internal 6564 } // namespace internal
6562 } // namespace v8 6565 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/heap.h ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698