Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(208)

Side by Side Diff: src/bootstrapper.cc

Issue 2373983004: [turbofan] inline %StringIteratorPrototype%.next in JSBuiltinReducer. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/code-stub-assembler.h » ('j') | src/compiler/access-builder.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | src/code-stub-assembler.h » ('j') | src/compiler/access-builder.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698