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