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 1424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1435 | 1435 |
1436 JSObject::AddProperty( | 1436 JSObject::AddProperty( |
1437 string_iterator_prototype, factory->to_string_tag_symbol(), | 1437 string_iterator_prototype, factory->to_string_tag_symbol(), |
1438 factory->NewStringFromAsciiChecked("String Iterator"), | 1438 factory->NewStringFromAsciiChecked("String Iterator"), |
1439 static_cast<PropertyAttributes>(DONT_ENUM | READ_ONLY)); | 1439 static_cast<PropertyAttributes>(DONT_ENUM | READ_ONLY)); |
1440 | 1440 |
1441 Handle<JSFunction> next = | 1441 Handle<JSFunction> next = |
1442 InstallFunction(string_iterator_prototype, "next", JS_OBJECT_TYPE, | 1442 InstallFunction(string_iterator_prototype, "next", JS_OBJECT_TYPE, |
1443 JSObject::kHeaderSize, MaybeHandle<JSObject>(), | 1443 JSObject::kHeaderSize, MaybeHandle<JSObject>(), |
1444 Builtins::kStringIteratorPrototypeNext); | 1444 Builtins::kStringIteratorPrototypeNext); |
| 1445 next->shared()->set_builtin_function_id(kStringIteratorPrototypeNext); |
1445 | 1446 |
1446 // Set the expected parameters for %StringIteratorPrototype%.next to 0 (not | 1447 // Set the expected parameters for %StringIteratorPrototype%.next to 0 (not |
1447 // including the receiver), as required by the builtin. | 1448 // including the receiver), as required by the builtin. |
1448 next->shared()->set_internal_formal_parameter_count(0); | 1449 next->shared()->set_internal_formal_parameter_count(0); |
1449 | 1450 |
1450 // Set the length for the function to satisfy ECMA-262. | 1451 // Set the length for the function to satisfy ECMA-262. |
1451 next->shared()->set_length(0); | 1452 next->shared()->set_length(0); |
1452 | 1453 |
1453 Handle<JSFunction> string_iterator_function = CreateFunction( | 1454 Handle<JSFunction> string_iterator_function = CreateFunction( |
1454 isolate, factory->NewStringFromAsciiChecked("StringIterator"), | 1455 isolate, factory->NewStringFromAsciiChecked("StringIterator"), |
(...skipping 2730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4185 } | 4186 } |
4186 | 4187 |
4187 | 4188 |
4188 // Called when the top-level V8 mutex is destroyed. | 4189 // Called when the top-level V8 mutex is destroyed. |
4189 void Bootstrapper::FreeThreadResources() { | 4190 void Bootstrapper::FreeThreadResources() { |
4190 DCHECK(!IsActive()); | 4191 DCHECK(!IsActive()); |
4191 } | 4192 } |
4192 | 4193 |
4193 } // namespace internal | 4194 } // namespace internal |
4194 } // namespace v8 | 4195 } // namespace v8 |
OLD | NEW |