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

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

Issue 2405253006: [builtins] implement Array.prototype[@@iterator] in TFJ builtins (Closed)
Patch Set: add array_iterator_protector, and check array_protector in holey fast arrays 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
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 2844 matching lines...) Expand 10 before | Expand all | Expand 10 after
2855 // Allocate the empty script. 2855 // Allocate the empty script.
2856 Handle<Script> script = factory->NewScript(factory->empty_string()); 2856 Handle<Script> script = factory->NewScript(factory->empty_string());
2857 script->set_type(Script::TYPE_NATIVE); 2857 script->set_type(Script::TYPE_NATIVE);
2858 set_empty_script(*script); 2858 set_empty_script(*script);
2859 2859
2860 Handle<PropertyCell> cell = factory->NewPropertyCell(); 2860 Handle<PropertyCell> cell = factory->NewPropertyCell();
2861 cell->set_value(Smi::FromInt(Isolate::kArrayProtectorValid)); 2861 cell->set_value(Smi::FromInt(Isolate::kArrayProtectorValid));
2862 set_array_protector(*cell); 2862 set_array_protector(*cell);
2863 2863
2864 cell = factory->NewPropertyCell(); 2864 cell = factory->NewPropertyCell();
2865 cell->set_value(Smi::FromInt(Isolate::kArrayProtectorValid));
2866 set_array_iterator_protector(*cell);
2867
2868 cell = factory->NewPropertyCell();
2865 cell->set_value(the_hole_value()); 2869 cell->set_value(the_hole_value());
2866 set_empty_property_cell(*cell); 2870 set_empty_property_cell(*cell);
2867 2871
2868 cell = factory->NewPropertyCell(); 2872 cell = factory->NewPropertyCell();
2869 cell->set_value(Smi::FromInt(Isolate::kArrayProtectorValid)); 2873 cell->set_value(Smi::FromInt(Isolate::kArrayProtectorValid));
2870 set_has_instance_protector(*cell); 2874 set_has_instance_protector(*cell);
2871 2875
2872 Handle<Cell> is_concat_spreadable_cell = factory->NewCell( 2876 Handle<Cell> is_concat_spreadable_cell = factory->NewCell(
2873 handle(Smi::FromInt(Isolate::kArrayProtectorValid), isolate())); 2877 handle(Smi::FromInt(Isolate::kArrayProtectorValid), isolate()));
2874 set_is_concat_spreadable_protector(*is_concat_spreadable_cell); 2878 set_is_concat_spreadable_protector(*is_concat_spreadable_cell);
(...skipping 3628 matching lines...) Expand 10 before | Expand all | Expand 10 after
6503 } 6507 }
6504 6508
6505 6509
6506 // static 6510 // static
6507 int Heap::GetStaticVisitorIdForMap(Map* map) { 6511 int Heap::GetStaticVisitorIdForMap(Map* map) {
6508 return StaticVisitorBase::GetVisitorId(map); 6512 return StaticVisitorBase::GetVisitorId(map);
6509 } 6513 }
6510 6514
6511 } // namespace internal 6515 } // namespace internal
6512 } // namespace v8 6516 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698