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

Side by Side Diff: src/bootstrapper.cc

Issue 2422383002: [turbofan] Implement JSBuiltinReducer for String.prototype[Symbol.iterator]. (Closed)
Patch Set: pass input context twice to LoadContext. fixes tests. 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/compiler/js-builtin-reducer.h » ('j') | no next file with comments »
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 1458 matching lines...) Expand 10 before | Expand all | Expand 10 after
1469 Builtins::kStringPrototypeTrimLeft, 0, false); 1469 Builtins::kStringPrototypeTrimLeft, 0, false);
1470 SimpleInstallFunction(prototype, "trimRight", 1470 SimpleInstallFunction(prototype, "trimRight",
1471 Builtins::kStringPrototypeTrimRight, 0, false); 1471 Builtins::kStringPrototypeTrimRight, 0, false);
1472 SimpleInstallFunction(prototype, "valueOf", 1472 SimpleInstallFunction(prototype, "valueOf",
1473 Builtins::kStringPrototypeValueOf, 0, true); 1473 Builtins::kStringPrototypeValueOf, 0, true);
1474 1474
1475 Handle<JSFunction> iterator = SimpleCreateFunction( 1475 Handle<JSFunction> iterator = SimpleCreateFunction(
1476 isolate, factory->NewStringFromAsciiChecked("[Symbol.iterator]"), 1476 isolate, factory->NewStringFromAsciiChecked("[Symbol.iterator]"),
1477 Builtins::kStringPrototypeIterator, 0, true); 1477 Builtins::kStringPrototypeIterator, 0, true);
1478 iterator->shared()->set_native(true); 1478 iterator->shared()->set_native(true);
1479 iterator->shared()->set_builtin_function_id(kStringIterator);
1479 JSObject::AddProperty(prototype, factory->iterator_symbol(), iterator, 1480 JSObject::AddProperty(prototype, factory->iterator_symbol(), iterator,
1480 static_cast<PropertyAttributes>(DONT_ENUM)); 1481 static_cast<PropertyAttributes>(DONT_ENUM));
1481 } 1482 }
1482 1483
1483 { // --- S t r i n g I t e r a t o r --- 1484 { // --- S t r i n g I t e r a t o r ---
1484 Handle<JSObject> iterator_prototype( 1485 Handle<JSObject> iterator_prototype(
1485 native_context()->initial_iterator_prototype()); 1486 native_context()->initial_iterator_prototype());
1486 1487
1487 Handle<JSObject> string_iterator_prototype = 1488 Handle<JSObject> string_iterator_prototype =
1488 factory->NewJSObject(isolate->object_function(), TENURED); 1489 factory->NewJSObject(isolate->object_function(), TENURED);
(...skipping 2979 matching lines...) Expand 10 before | Expand all | Expand 10 after
4468 } 4469 }
4469 4470
4470 4471
4471 // Called when the top-level V8 mutex is destroyed. 4472 // Called when the top-level V8 mutex is destroyed.
4472 void Bootstrapper::FreeThreadResources() { 4473 void Bootstrapper::FreeThreadResources() {
4473 DCHECK(!IsActive()); 4474 DCHECK(!IsActive());
4474 } 4475 }
4475 4476
4476 } // namespace internal 4477 } // namespace internal
4477 } // namespace v8 4478 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/js-builtin-reducer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698