| 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 1432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1443 | 1443 |
| 1444 JSObject::AddProperty( | 1444 JSObject::AddProperty( |
| 1445 string_iterator_prototype, factory->to_string_tag_symbol(), | 1445 string_iterator_prototype, factory->to_string_tag_symbol(), |
| 1446 factory->NewStringFromAsciiChecked("String Iterator"), | 1446 factory->NewStringFromAsciiChecked("String Iterator"), |
| 1447 static_cast<PropertyAttributes>(DONT_ENUM | READ_ONLY)); | 1447 static_cast<PropertyAttributes>(DONT_ENUM | READ_ONLY)); |
| 1448 | 1448 |
| 1449 Handle<JSFunction> next = | 1449 Handle<JSFunction> next = |
| 1450 InstallFunction(string_iterator_prototype, "next", JS_OBJECT_TYPE, | 1450 InstallFunction(string_iterator_prototype, "next", JS_OBJECT_TYPE, |
| 1451 JSObject::kHeaderSize, MaybeHandle<JSObject>(), | 1451 JSObject::kHeaderSize, MaybeHandle<JSObject>(), |
| 1452 Builtins::kStringIteratorPrototypeNext); | 1452 Builtins::kStringIteratorPrototypeNext); |
| 1453 next->shared()->set_builtin_function_id(kStringIteratorNext); | |
| 1454 | 1453 |
| 1455 // Set the expected parameters for %StringIteratorPrototype%.next to 0 (not | 1454 // Set the expected parameters for %StringIteratorPrototype%.next to 0 (not |
| 1456 // including the receiver), as required by the builtin. | 1455 // including the receiver), as required by the builtin. |
| 1457 next->shared()->set_internal_formal_parameter_count(0); | 1456 next->shared()->set_internal_formal_parameter_count(0); |
| 1458 | 1457 |
| 1459 // Set the length for the function to satisfy ECMA-262. | 1458 // Set the length for the function to satisfy ECMA-262. |
| 1460 next->shared()->set_length(0); | 1459 next->shared()->set_length(0); |
| 1461 | 1460 |
| 1462 Handle<JSFunction> string_iterator_function = CreateFunction( | 1461 Handle<JSFunction> string_iterator_function = CreateFunction( |
| 1463 isolate, factory->NewStringFromAsciiChecked("StringIterator"), | 1462 isolate, factory->NewStringFromAsciiChecked("StringIterator"), |
| (...skipping 2744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4208 } | 4207 } |
| 4209 | 4208 |
| 4210 | 4209 |
| 4211 // Called when the top-level V8 mutex is destroyed. | 4210 // Called when the top-level V8 mutex is destroyed. |
| 4212 void Bootstrapper::FreeThreadResources() { | 4211 void Bootstrapper::FreeThreadResources() { |
| 4213 DCHECK(!IsActive()); | 4212 DCHECK(!IsActive()); |
| 4214 } | 4213 } |
| 4215 | 4214 |
| 4216 } // namespace internal | 4215 } // namespace internal |
| 4217 } // namespace v8 | 4216 } // namespace v8 |
| OLD | NEW |