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/base/ieee754.h" | 9 #include "src/base/ieee754.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 2549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2560 { // -- J S M o d u l e N a m e s p a c e | 2560 { // -- J S M o d u l e N a m e s p a c e |
2561 Handle<Map> map = | 2561 Handle<Map> map = |
2562 factory->NewMap(JS_MODULE_NAMESPACE_TYPE, JSModuleNamespace::kSize); | 2562 factory->NewMap(JS_MODULE_NAMESPACE_TYPE, JSModuleNamespace::kSize); |
2563 Map::SetPrototype(map, isolate->factory()->null_value()); | 2563 Map::SetPrototype(map, isolate->factory()->null_value()); |
2564 Map::EnsureDescriptorSlack(map, 1); | 2564 Map::EnsureDescriptorSlack(map, 1); |
2565 native_context()->set_js_module_namespace_map(*map); | 2565 native_context()->set_js_module_namespace_map(*map); |
2566 | 2566 |
2567 { // Install @@toStringTag. | 2567 { // Install @@toStringTag. |
2568 PropertyAttributes attribs = | 2568 PropertyAttributes attribs = |
2569 static_cast<PropertyAttributes>(DONT_DELETE | DONT_ENUM | READ_ONLY); | 2569 static_cast<PropertyAttributes>(DONT_DELETE | DONT_ENUM | READ_ONLY); |
2570 Descriptor d = Descriptor::DataConstant( | 2570 Descriptor d = |
2571 factory->to_string_tag_symbol(), | 2571 Descriptor::DataField(factory->to_string_tag_symbol(), |
2572 factory->NewStringFromAsciiChecked("Module"), attribs); | 2572 JSModuleNamespace::kToStringTagFieldIndex, |
| 2573 attribs, Representation::Tagged()); |
2573 map->AppendDescriptor(&d); | 2574 map->AppendDescriptor(&d); |
2574 } | 2575 } |
| 2576 |
| 2577 map->SetInObjectProperties(JSModuleNamespace::kInObjectFieldCount); |
2575 } | 2578 } |
2576 | 2579 |
2577 { // -- I t e r a t o r R e s u l t | 2580 { // -- I t e r a t o r R e s u l t |
2578 Handle<Map> map = | 2581 Handle<Map> map = |
2579 factory->NewMap(JS_OBJECT_TYPE, JSIteratorResult::kSize); | 2582 factory->NewMap(JS_OBJECT_TYPE, JSIteratorResult::kSize); |
2580 Map::SetPrototype(map, isolate->initial_object_prototype()); | 2583 Map::SetPrototype(map, isolate->initial_object_prototype()); |
2581 Map::EnsureDescriptorSlack(map, 2); | 2584 Map::EnsureDescriptorSlack(map, 2); |
2582 | 2585 |
2583 { // value | 2586 { // value |
2584 Descriptor d = Descriptor::DataField(factory->value_string(), | 2587 Descriptor d = Descriptor::DataField(factory->value_string(), |
(...skipping 2157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4742 } | 4745 } |
4743 | 4746 |
4744 | 4747 |
4745 // Called when the top-level V8 mutex is destroyed. | 4748 // Called when the top-level V8 mutex is destroyed. |
4746 void Bootstrapper::FreeThreadResources() { | 4749 void Bootstrapper::FreeThreadResources() { |
4747 DCHECK(!IsActive()); | 4750 DCHECK(!IsActive()); |
4748 } | 4751 } |
4749 | 4752 |
4750 } // namespace internal | 4753 } // namespace internal |
4751 } // namespace v8 | 4754 } // namespace v8 |
OLD | NEW |