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

Unified Diff: src/generator.js

Issue 551793002: Properly disable ES6 generator support for TurboFan. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/runtime.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/generator.js
diff --git a/src/generator.js b/src/generator.js
index c62fe2c771389db255528087262c9ead49d55b39..c94c4ff0db1d1fe59e9bdbd932e935e69a1d2d91 100644
--- a/src/generator.js
+++ b/src/generator.js
@@ -57,11 +57,19 @@ function GeneratorFunctionConstructor(arg1) { // length == 1
function SetUpGenerators() {
%CheckIsBootstrapping();
+
+ // Both Runtime_GeneratorNext and Runtime_GeneratorThrow are supported by
+ // neither Crankshaft nor TurboFan, disable optimization of wrappers here.
+ %NeverOptimizeFunction(GeneratorObjectNext);
+ %NeverOptimizeFunction(GeneratorObjectThrow);
+
+ // Set up non-enumerable functions on the generator prototype object.
var GeneratorObjectPrototype = GeneratorFunctionPrototype.prototype;
InstallFunctions(GeneratorObjectPrototype,
DONT_ENUM | DONT_DELETE | READ_ONLY,
["next", GeneratorObjectNext,
"throw", GeneratorObjectThrow]);
+
%FunctionSetName(GeneratorObjectIterator, '[Symbol.iterator]');
%AddNamedProperty(GeneratorObjectPrototype, symbolIterator,
GeneratorObjectIterator, DONT_ENUM | DONT_DELETE | READ_ONLY);
« no previous file with comments | « no previous file | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698