| OLD | NEW |
| 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 2799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2810 // Handling of script id generation is in Heap::NextScriptId(). | 2810 // Handling of script id generation is in Heap::NextScriptId(). |
| 2811 set_last_script_id(Smi::FromInt(v8::UnboundScript::kNoScriptId)); | 2811 set_last_script_id(Smi::FromInt(v8::UnboundScript::kNoScriptId)); |
| 2812 set_next_template_serial_number(Smi::kZero); | 2812 set_next_template_serial_number(Smi::kZero); |
| 2813 | 2813 |
| 2814 // Allocate the empty script. | 2814 // Allocate the empty script. |
| 2815 Handle<Script> script = factory->NewScript(factory->empty_string()); | 2815 Handle<Script> script = factory->NewScript(factory->empty_string()); |
| 2816 script->set_type(Script::TYPE_NATIVE); | 2816 script->set_type(Script::TYPE_NATIVE); |
| 2817 set_empty_script(*script); | 2817 set_empty_script(*script); |
| 2818 | 2818 |
| 2819 Handle<PropertyCell> cell = factory->NewPropertyCell(); | 2819 Handle<PropertyCell> cell = factory->NewPropertyCell(); |
| 2820 cell->set_value(Smi::FromInt(Isolate::kArrayProtectorValid)); | 2820 cell->set_value(Smi::FromInt(Isolate::kProtectorValid)); |
| 2821 set_array_protector(*cell); | 2821 set_array_protector(*cell); |
| 2822 | 2822 |
| 2823 cell = factory->NewPropertyCell(); | 2823 cell = factory->NewPropertyCell(); |
| 2824 cell->set_value(the_hole_value()); | 2824 cell->set_value(the_hole_value()); |
| 2825 set_empty_property_cell(*cell); | 2825 set_empty_property_cell(*cell); |
| 2826 | 2826 |
| 2827 cell = factory->NewPropertyCell(); | 2827 cell = factory->NewPropertyCell(); |
| 2828 cell->set_value(Smi::FromInt(Isolate::kArrayProtectorValid)); | 2828 cell->set_value(Smi::FromInt(Isolate::kProtectorValid)); |
| 2829 set_has_instance_protector(*cell); | 2829 set_has_instance_protector(*cell); |
| 2830 | 2830 |
| 2831 Handle<Cell> is_concat_spreadable_cell = factory->NewCell( | 2831 Handle<Cell> is_concat_spreadable_cell = factory->NewCell( |
| 2832 handle(Smi::FromInt(Isolate::kArrayProtectorValid), isolate())); | 2832 handle(Smi::FromInt(Isolate::kProtectorValid), isolate())); |
| 2833 set_is_concat_spreadable_protector(*is_concat_spreadable_cell); | 2833 set_is_concat_spreadable_protector(*is_concat_spreadable_cell); |
| 2834 | 2834 |
| 2835 Handle<Cell> species_cell = factory->NewCell( | 2835 Handle<Cell> species_cell = factory->NewCell( |
| 2836 handle(Smi::FromInt(Isolate::kArrayProtectorValid), isolate())); | 2836 handle(Smi::FromInt(Isolate::kProtectorValid), isolate())); |
| 2837 set_species_protector(*species_cell); | 2837 set_species_protector(*species_cell); |
| 2838 | 2838 |
| 2839 cell = factory->NewPropertyCell(); | 2839 cell = factory->NewPropertyCell(); |
| 2840 cell->set_value(Smi::FromInt(Isolate::kArrayProtectorValid)); | 2840 cell->set_value(Smi::FromInt(Isolate::kProtectorValid)); |
| 2841 set_string_length_protector(*cell); | 2841 set_string_length_protector(*cell); |
| 2842 | 2842 |
| 2843 Handle<Cell> array_iterator_cell = factory->NewCell( |
| 2844 handle(Smi::FromInt(Isolate::kProtectorValid), isolate())); |
| 2845 set_array_iterator_protector(*array_iterator_cell); |
| 2846 |
| 2843 set_serialized_templates(empty_fixed_array()); | 2847 set_serialized_templates(empty_fixed_array()); |
| 2844 | 2848 |
| 2845 set_weak_stack_trace_list(Smi::kZero); | 2849 set_weak_stack_trace_list(Smi::kZero); |
| 2846 | 2850 |
| 2847 set_noscript_shared_function_infos(Smi::kZero); | 2851 set_noscript_shared_function_infos(Smi::kZero); |
| 2848 | 2852 |
| 2849 // Initialize context slot cache. | 2853 // Initialize context slot cache. |
| 2850 isolate_->context_slot_cache()->Clear(); | 2854 isolate_->context_slot_cache()->Clear(); |
| 2851 | 2855 |
| 2852 // Initialize descriptor cache. | 2856 // Initialize descriptor cache. |
| (...skipping 3602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6455 } | 6459 } |
| 6456 | 6460 |
| 6457 | 6461 |
| 6458 // static | 6462 // static |
| 6459 int Heap::GetStaticVisitorIdForMap(Map* map) { | 6463 int Heap::GetStaticVisitorIdForMap(Map* map) { |
| 6460 return StaticVisitorBase::GetVisitorId(map); | 6464 return StaticVisitorBase::GetVisitorId(map); |
| 6461 } | 6465 } |
| 6462 | 6466 |
| 6463 } // namespace internal | 6467 } // namespace internal |
| 6464 } // namespace v8 | 6468 } // namespace v8 |
| OLD | NEW |