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

Unified Diff: src/compiler.cc

Issue 1884183002: First version of the new generators implementation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 4 years, 8 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
Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index 43759571fabe93f0ef1db338c1b8f0329024b773..78021d5681b1f8f19d0d7dbcad3a6ee3d54b93cc 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -506,8 +506,7 @@ bool UseIgnition(CompilationInfo* info) {
return false;
}
- // TODO(4681): Generator functions are not yet supported.
- if (info->shared_info()->is_generator()) {
+ if (info->shared_info()->is_generator() && !FLAG_ignition_generators) {
return false;
}
@@ -840,6 +839,13 @@ MaybeHandle<Code> GetOptimizedCode(Handle<JSFunction> function,
return MaybeHandle<Code>();
}
+ // Do not use Crankshaft/TurboFan on a generator function.
+ // TODO(neis): Eventually enable for Turbofan.
+ if (IsGeneratorFunction(info->shared_info()->kind())) {
+ info->AbortOptimization(kGenerator);
+ return MaybeHandle<Code>();
+ }
+
// Limit the number of times we try to optimize functions.
const int kMaxOptCount =
FLAG_deopt_every_n_times == 0 ? FLAG_max_opt_count : 1000;
« no previous file with comments | « src/builtins.cc ('k') | src/debug/mirrors.js » ('j') | src/interpreter/bytecode-generator.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698