| 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 731 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 742 strict_function_map_writable_prototype_ = | 742 strict_function_map_writable_prototype_ = |
| 743 CreateStrictFunctionMap(FUNCTION_WITH_WRITEABLE_PROTOTYPE, empty); | 743 CreateStrictFunctionMap(FUNCTION_WITH_WRITEABLE_PROTOTYPE, empty); |
| 744 } | 744 } |
| 745 | 745 |
| 746 void Genesis::CreateIteratorMaps(Handle<JSFunction> empty) { | 746 void Genesis::CreateIteratorMaps(Handle<JSFunction> empty) { |
| 747 // Create iterator-related meta-objects. | 747 // Create iterator-related meta-objects. |
| 748 Handle<JSObject> iterator_prototype = | 748 Handle<JSObject> iterator_prototype = |
| 749 factory()->NewJSObject(isolate()->object_function(), TENURED); | 749 factory()->NewJSObject(isolate()->object_function(), TENURED); |
| 750 Handle<JSObject> generator_object_prototype = | 750 Handle<JSObject> generator_object_prototype = |
| 751 factory()->NewJSObject(isolate()->object_function(), TENURED); | 751 factory()->NewJSObject(isolate()->object_function(), TENURED); |
| 752 native_context()->set_initial_generator_prototype( |
| 753 *generator_object_prototype); |
| 752 SetObjectPrototype(generator_object_prototype, iterator_prototype); | 754 SetObjectPrototype(generator_object_prototype, iterator_prototype); |
| 753 Handle<JSObject> generator_function_prototype = | 755 Handle<JSObject> generator_function_prototype = |
| 754 factory()->NewJSObject(isolate()->object_function(), TENURED); | 756 factory()->NewJSObject(isolate()->object_function(), TENURED); |
| 755 SetObjectPrototype(generator_function_prototype, empty); | 757 SetObjectPrototype(generator_function_prototype, empty); |
| 756 | 758 |
| 757 JSObject::AddProperty( | 759 JSObject::AddProperty( |
| 758 generator_function_prototype, factory()->to_string_tag_symbol(), | 760 generator_function_prototype, factory()->to_string_tag_symbol(), |
| 759 factory()->NewStringFromAsciiChecked("GeneratorFunction"), | 761 factory()->NewStringFromAsciiChecked("GeneratorFunction"), |
| 760 static_cast<PropertyAttributes>(DONT_ENUM | READ_ONLY)); | 762 static_cast<PropertyAttributes>(DONT_ENUM | READ_ONLY)); |
| 761 JSObject::AddProperty(generator_function_prototype, | 763 JSObject::AddProperty(generator_function_prototype, |
| (...skipping 3005 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3767 } | 3769 } |
| 3768 | 3770 |
| 3769 | 3771 |
| 3770 // Called when the top-level V8 mutex is destroyed. | 3772 // Called when the top-level V8 mutex is destroyed. |
| 3771 void Bootstrapper::FreeThreadResources() { | 3773 void Bootstrapper::FreeThreadResources() { |
| 3772 DCHECK(!IsActive()); | 3774 DCHECK(!IsActive()); |
| 3773 } | 3775 } |
| 3774 | 3776 |
| 3775 } // namespace internal | 3777 } // namespace internal |
| 3776 } // namespace v8 | 3778 } // namespace v8 |
| OLD | NEW |