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/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/base/once.h" | 10 #include "src/base/once.h" |
(...skipping 3285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3296 Handle<SeededNumberDictionary> slow_element_dictionary = | 3296 Handle<SeededNumberDictionary> slow_element_dictionary = |
3297 SeededNumberDictionary::New(isolate(), 0, TENURED); | 3297 SeededNumberDictionary::New(isolate(), 0, TENURED); |
3298 slow_element_dictionary->set_requires_slow_elements(); | 3298 slow_element_dictionary->set_requires_slow_elements(); |
3299 set_empty_slow_element_dictionary(*slow_element_dictionary); | 3299 set_empty_slow_element_dictionary(*slow_element_dictionary); |
3300 | 3300 |
3301 set_materialized_objects(*factory->NewFixedArray(0, TENURED)); | 3301 set_materialized_objects(*factory->NewFixedArray(0, TENURED)); |
3302 | 3302 |
3303 // Handling of script id generation is in Factory::NewScript. | 3303 // Handling of script id generation is in Factory::NewScript. |
3304 set_last_script_id(Smi::FromInt(v8::UnboundScript::kNoScriptId)); | 3304 set_last_script_id(Smi::FromInt(v8::UnboundScript::kNoScriptId)); |
3305 | 3305 |
| 3306 // Allocate the empty script. |
| 3307 Handle<Script> script = factory->NewScript(factory->empty_string()); |
| 3308 script->set_type(Smi::FromInt(Script::TYPE_NATIVE)); |
| 3309 set_empty_script(*script); |
| 3310 |
3306 Handle<PropertyCell> cell = factory->NewPropertyCell(); | 3311 Handle<PropertyCell> cell = factory->NewPropertyCell(); |
3307 cell->set_value(Smi::FromInt(Isolate::kArrayProtectorValid)); | 3312 cell->set_value(Smi::FromInt(Isolate::kArrayProtectorValid)); |
3308 set_array_protector(*cell); | 3313 set_array_protector(*cell); |
3309 | 3314 |
3310 cell = factory->NewPropertyCell(); | 3315 cell = factory->NewPropertyCell(); |
3311 cell->set_value(the_hole_value()); | 3316 cell->set_value(the_hole_value()); |
3312 set_empty_property_cell(*cell); | 3317 set_empty_property_cell(*cell); |
3313 | 3318 |
3314 set_weak_stack_trace_list(Smi::FromInt(0)); | 3319 set_weak_stack_trace_list(Smi::FromInt(0)); |
3315 | 3320 |
(...skipping 3459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6775 *object_type = "CODE_TYPE"; \ | 6780 *object_type = "CODE_TYPE"; \ |
6776 *object_sub_type = "CODE_AGE/" #name; \ | 6781 *object_sub_type = "CODE_AGE/" #name; \ |
6777 return true; | 6782 return true; |
6778 CODE_AGE_LIST_COMPLETE(COMPARE_AND_RETURN_NAME) | 6783 CODE_AGE_LIST_COMPLETE(COMPARE_AND_RETURN_NAME) |
6779 #undef COMPARE_AND_RETURN_NAME | 6784 #undef COMPARE_AND_RETURN_NAME |
6780 } | 6785 } |
6781 return false; | 6786 return false; |
6782 } | 6787 } |
6783 } // namespace internal | 6788 } // namespace internal |
6784 } // namespace v8 | 6789 } // namespace v8 |
OLD | NEW |