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

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: 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
« no previous file with comments | « no previous file | src/flag-definitions.h » ('j') | src/interpreter/bytecode-generator.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index 98d36748b59dbe87ace552bd69fd7faf96a68772..9d5bf20dfaa0a30e7972c3f5b79a7d2193a55cbb 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -315,6 +315,12 @@ OptimizedCompileJob::Status OptimizedCompileJob::CreateGraph() {
return AbortOptimization(kFunctionBeingDebugged);
}
+ // Do not use Crankshaft/TurboFan on a generator function.
+ // TODO(neis): Eventually enable for Turbofan.
+ if (IsGeneratorFunction(info()->shared_info()->kind())) {
+ return AbortOptimization(kGenerator);
+ }
+
// Limit the number of times we try to optimize functions.
const int kMaxOptCount =
FLAG_deopt_every_n_times == 0 ? FLAG_max_opt_count : 1000;
@@ -550,8 +556,7 @@ bool CompileUnoptimizedCode(CompilationInfo* info) {
}
bool UseIgnition(CompilationInfo* info) {
- // 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;
}
« no previous file with comments | « no previous file | src/flag-definitions.h » ('j') | src/interpreter/bytecode-generator.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698