| 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 1308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1319 } | 1319 } |
| 1320 | 1320 |
| 1321 { // --- A r r a y I t e r a t o r --- | 1321 { // --- A r r a y I t e r a t o r --- |
| 1322 Handle<JSObject> iterator_prototype( | 1322 Handle<JSObject> iterator_prototype( |
| 1323 native_context()->initial_iterator_prototype()); | 1323 native_context()->initial_iterator_prototype()); |
| 1324 | 1324 |
| 1325 Handle<JSObject> array_iterator_prototype = | 1325 Handle<JSObject> array_iterator_prototype = |
| 1326 factory->NewJSObject(isolate->object_function(), TENURED); | 1326 factory->NewJSObject(isolate->object_function(), TENURED); |
| 1327 JSObject::ForceSetPrototype(array_iterator_prototype, iterator_prototype); | 1327 JSObject::ForceSetPrototype(array_iterator_prototype, iterator_prototype); |
| 1328 | 1328 |
| 1329 native_context()->set_initial_array_iterator_prototype( |
| 1330 *array_iterator_prototype); |
| 1331 |
| 1329 JSObject::AddProperty( | 1332 JSObject::AddProperty( |
| 1330 array_iterator_prototype, factory->to_string_tag_symbol(), | 1333 array_iterator_prototype, factory->to_string_tag_symbol(), |
| 1331 factory->ArrayIterator_string(), | 1334 factory->ArrayIterator_string(), |
| 1332 static_cast<PropertyAttributes>(DONT_ENUM | READ_ONLY)); | 1335 static_cast<PropertyAttributes>(DONT_ENUM | READ_ONLY)); |
| 1333 | 1336 |
| 1334 Handle<JSFunction> next = InstallFunction( | 1337 Handle<JSFunction> next = InstallFunction( |
| 1335 array_iterator_prototype, "next", JS_OBJECT_TYPE, JSObject::kHeaderSize, | 1338 array_iterator_prototype, "next", JS_OBJECT_TYPE, JSObject::kHeaderSize, |
| 1336 MaybeHandle<JSObject>(), Builtins::kArrayIteratorPrototypeNext); | 1339 MaybeHandle<JSObject>(), Builtins::kArrayIteratorPrototypeNext); |
| 1337 | 1340 |
| 1338 // Set the expected parameters for %ArrayIteratorPrototype%.next to 0 (not | 1341 // Set the expected parameters for %ArrayIteratorPrototype%.next to 0 (not |
| (...skipping 3204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4543 } | 4546 } |
| 4544 | 4547 |
| 4545 | 4548 |
| 4546 // Called when the top-level V8 mutex is destroyed. | 4549 // Called when the top-level V8 mutex is destroyed. |
| 4547 void Bootstrapper::FreeThreadResources() { | 4550 void Bootstrapper::FreeThreadResources() { |
| 4548 DCHECK(!IsActive()); | 4551 DCHECK(!IsActive()); |
| 4549 } | 4552 } |
| 4550 | 4553 |
| 4551 } // namespace internal | 4554 } // namespace internal |
| 4552 } // namespace v8 | 4555 } // namespace v8 |
| OLD | NEW |