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