OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/bootstrapper.h" | 5 #include "src/bootstrapper.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/api-natives.h" | 8 #include "src/api-natives.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/extensions/externalize-string-extension.h" | 10 #include "src/extensions/externalize-string-extension.h" |
(...skipping 1573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1584 NONE, Representation::Tagged()); | 1584 NONE, Representation::Tagged()); |
1585 map->AppendDescriptor(&d); | 1585 map->AppendDescriptor(&d); |
1586 } | 1586 } |
1587 | 1587 |
1588 { // done | 1588 { // done |
1589 DataDescriptor d(factory->done_string(), JSIteratorResult::kDoneIndex, | 1589 DataDescriptor d(factory->done_string(), JSIteratorResult::kDoneIndex, |
1590 NONE, Representation::Tagged()); | 1590 NONE, Representation::Tagged()); |
1591 map->AppendDescriptor(&d); | 1591 map->AppendDescriptor(&d); |
1592 } | 1592 } |
1593 | 1593 |
| 1594 map->SetConstructor(native_context()->object_function()); |
1594 map->SetInObjectProperties(2); | 1595 map->SetInObjectProperties(2); |
1595 native_context()->set_iterator_result_map(*map); | 1596 native_context()->set_iterator_result_map(*map); |
1596 } | 1597 } |
1597 | 1598 |
1598 { // -- W e a k M a p | 1599 { // -- W e a k M a p |
1599 Handle<JSFunction> js_weak_map_fun = InstallFunction( | 1600 Handle<JSFunction> js_weak_map_fun = InstallFunction( |
1600 global, "WeakMap", JS_WEAK_MAP_TYPE, JSWeakMap::kSize, | 1601 global, "WeakMap", JS_WEAK_MAP_TYPE, JSWeakMap::kSize, |
1601 isolate->initial_object_prototype(), Builtins::kIllegal); | 1602 isolate->initial_object_prototype(), Builtins::kIllegal); |
1602 InstallWithIntrinsicDefaultProto(isolate, js_weak_map_fun, | 1603 InstallWithIntrinsicDefaultProto(isolate, js_weak_map_fun, |
1603 Context::JS_WEAK_MAP_FUN_INDEX); | 1604 Context::JS_WEAK_MAP_FUN_INDEX); |
(...skipping 1177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2781 map->AppendDescriptor(&d); | 2782 map->AppendDescriptor(&d); |
2782 } | 2783 } |
2783 { // configurable | 2784 { // configurable |
2784 DataDescriptor d(factory()->configurable_string(), | 2785 DataDescriptor d(factory()->configurable_string(), |
2785 JSAccessorPropertyDescriptor::kConfigurableIndex, NONE, | 2786 JSAccessorPropertyDescriptor::kConfigurableIndex, NONE, |
2786 Representation::Tagged()); | 2787 Representation::Tagged()); |
2787 map->AppendDescriptor(&d); | 2788 map->AppendDescriptor(&d); |
2788 } | 2789 } |
2789 | 2790 |
2790 Map::SetPrototype(map, isolate()->initial_object_prototype()); | 2791 Map::SetPrototype(map, isolate()->initial_object_prototype()); |
| 2792 map->SetConstructor(native_context()->object_function()); |
2791 map->SetInObjectProperties(4); | 2793 map->SetInObjectProperties(4); |
2792 map->set_unused_property_fields(0); | 2794 map->set_unused_property_fields(0); |
2793 | 2795 |
2794 native_context()->set_accessor_property_descriptor_map(*map); | 2796 native_context()->set_accessor_property_descriptor_map(*map); |
2795 } | 2797 } |
2796 | 2798 |
2797 // Create a map for data property descriptors (a variant of JSObject | 2799 // Create a map for data property descriptors (a variant of JSObject |
2798 // that predefines four properties value, writable, configurable and | 2800 // that predefines four properties value, writable, configurable and |
2799 // enumerable). | 2801 // enumerable). |
2800 { | 2802 { |
(...skipping 22 matching lines...) Expand all Loading... |
2823 map->AppendDescriptor(&d); | 2825 map->AppendDescriptor(&d); |
2824 } | 2826 } |
2825 { // configurable | 2827 { // configurable |
2826 DataDescriptor d(factory()->configurable_string(), | 2828 DataDescriptor d(factory()->configurable_string(), |
2827 JSDataPropertyDescriptor::kConfigurableIndex, NONE, | 2829 JSDataPropertyDescriptor::kConfigurableIndex, NONE, |
2828 Representation::Tagged()); | 2830 Representation::Tagged()); |
2829 map->AppendDescriptor(&d); | 2831 map->AppendDescriptor(&d); |
2830 } | 2832 } |
2831 | 2833 |
2832 Map::SetPrototype(map, isolate()->initial_object_prototype()); | 2834 Map::SetPrototype(map, isolate()->initial_object_prototype()); |
| 2835 map->SetConstructor(native_context()->object_function()); |
2833 map->SetInObjectProperties(4); | 2836 map->SetInObjectProperties(4); |
2834 map->set_unused_property_fields(0); | 2837 map->set_unused_property_fields(0); |
2835 | 2838 |
2836 native_context()->set_data_property_descriptor_map(*map); | 2839 native_context()->set_data_property_descriptor_map(*map); |
2837 } | 2840 } |
2838 | 2841 |
2839 // Create a constructor for RegExp results (a variant of Array that | 2842 // Create a constructor for RegExp results (a variant of Array that |
2840 // predefines the two properties index and match). | 2843 // predefines the two properties index and match). |
2841 { | 2844 { |
2842 // RegExpResult initial map. | 2845 // RegExpResult initial map. |
(...skipping 789 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3632 } | 3635 } |
3633 | 3636 |
3634 | 3637 |
3635 // Called when the top-level V8 mutex is destroyed. | 3638 // Called when the top-level V8 mutex is destroyed. |
3636 void Bootstrapper::FreeThreadResources() { | 3639 void Bootstrapper::FreeThreadResources() { |
3637 DCHECK(!IsActive()); | 3640 DCHECK(!IsActive()); |
3638 } | 3641 } |
3639 | 3642 |
3640 } // namespace internal | 3643 } // namespace internal |
3641 } // namespace v8 | 3644 } // namespace v8 |
OLD | NEW |