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 645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
656 AddRestrictedFunctionProperties(empty); | 656 AddRestrictedFunctionProperties(empty); |
657 } | 657 } |
658 | 658 |
659 void Genesis::CreateIteratorMaps(Handle<JSFunction> empty) { | 659 void Genesis::CreateIteratorMaps(Handle<JSFunction> empty) { |
660 // Create iterator-related meta-objects. | 660 // Create iterator-related meta-objects. |
661 Handle<JSObject> iterator_prototype = | 661 Handle<JSObject> iterator_prototype = |
662 factory()->NewJSObject(isolate()->object_function(), TENURED); | 662 factory()->NewJSObject(isolate()->object_function(), TENURED); |
663 | 663 |
664 Handle<JSFunction> iterator_prototype_iterator = SimpleCreateFunction( | 664 Handle<JSFunction> iterator_prototype_iterator = SimpleCreateFunction( |
665 isolate(), factory()->NewStringFromAsciiChecked("[Symbol.iterator]"), | 665 isolate(), factory()->NewStringFromAsciiChecked("[Symbol.iterator]"), |
666 Builtins::kIteratorPrototypeIterator, 0, false); | 666 Builtins::kIteratorPrototypeIterator, 0, true); |
667 iterator_prototype_iterator->shared()->set_native(true); | 667 iterator_prototype_iterator->shared()->set_native(true); |
668 | 668 |
669 JSObject::AddProperty(iterator_prototype, factory()->iterator_symbol(), | 669 JSObject::AddProperty(iterator_prototype, factory()->iterator_symbol(), |
670 iterator_prototype_iterator, DONT_ENUM); | 670 iterator_prototype_iterator, DONT_ENUM); |
671 native_context()->set_initial_iterator_prototype(*iterator_prototype); | 671 native_context()->set_initial_iterator_prototype(*iterator_prototype); |
672 | 672 |
673 Handle<JSObject> generator_object_prototype = | 673 Handle<JSObject> generator_object_prototype = |
674 factory()->NewJSObject(isolate()->object_function(), TENURED); | 674 factory()->NewJSObject(isolate()->object_function(), TENURED); |
675 native_context()->set_initial_generator_prototype( | 675 native_context()->set_initial_generator_prototype( |
676 *generator_object_prototype); | 676 *generator_object_prototype); |
(...skipping 3507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4184 } | 4184 } |
4185 | 4185 |
4186 | 4186 |
4187 // Called when the top-level V8 mutex is destroyed. | 4187 // Called when the top-level V8 mutex is destroyed. |
4188 void Bootstrapper::FreeThreadResources() { | 4188 void Bootstrapper::FreeThreadResources() { |
4189 DCHECK(!IsActive()); | 4189 DCHECK(!IsActive()); |
4190 } | 4190 } |
4191 | 4191 |
4192 } // namespace internal | 4192 } // namespace internal |
4193 } // namespace v8 | 4193 } // namespace v8 |
OLD | NEW |