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

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

Issue 1689733002: Optimize @@species based on a global 'protector' cell (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 4 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/isolate.h » ('j') | src/isolate.cc » ('J')
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/scopeinfo.h" 9 #include "src/ast/scopeinfo.h"
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 2833 matching lines...) Expand 10 before | Expand all | Expand 10 after
2844 set_empty_script(*script); 2844 set_empty_script(*script);
2845 2845
2846 Handle<PropertyCell> cell = factory->NewPropertyCell(); 2846 Handle<PropertyCell> cell = factory->NewPropertyCell();
2847 cell->set_value(Smi::FromInt(Isolate::kArrayProtectorValid)); 2847 cell->set_value(Smi::FromInt(Isolate::kArrayProtectorValid));
2848 set_array_protector(*cell); 2848 set_array_protector(*cell);
2849 2849
2850 cell = factory->NewPropertyCell(); 2850 cell = factory->NewPropertyCell();
2851 cell->set_value(the_hole_value()); 2851 cell->set_value(the_hole_value());
2852 set_empty_property_cell(*cell); 2852 set_empty_property_cell(*cell);
2853 2853
2854 Handle<PropertyCell> species_cell = factory->NewPropertyCell();
2855 species_cell->set_value(Smi::FromInt(Isolate::kArrayProtectorValid));
2856 set_species_protector(*species_cell);
2857
2854 set_weak_stack_trace_list(Smi::FromInt(0)); 2858 set_weak_stack_trace_list(Smi::FromInt(0));
2855 2859
2856 set_noscript_shared_function_infos(Smi::FromInt(0)); 2860 set_noscript_shared_function_infos(Smi::FromInt(0));
2857 2861
2858 // Initialize keyed lookup cache. 2862 // Initialize keyed lookup cache.
2859 isolate_->keyed_lookup_cache()->Clear(); 2863 isolate_->keyed_lookup_cache()->Clear();
2860 2864
2861 // Initialize context slot cache. 2865 // Initialize context slot cache.
2862 isolate_->context_slot_cache()->Clear(); 2866 isolate_->context_slot_cache()->Clear();
2863 2867
(...skipping 3423 matching lines...) Expand 10 before | Expand all | Expand 10 after
6287 } 6291 }
6288 6292
6289 6293
6290 // static 6294 // static
6291 int Heap::GetStaticVisitorIdForMap(Map* map) { 6295 int Heap::GetStaticVisitorIdForMap(Map* map) {
6292 return StaticVisitorBase::GetVisitorId(map); 6296 return StaticVisitorBase::GetVisitorId(map);
6293 } 6297 }
6294 6298
6295 } // namespace internal 6299 } // namespace internal
6296 } // namespace v8 6300 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/heap.h ('k') | src/isolate.h » ('j') | src/isolate.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698