| 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;
|
| }
|
|
|
|
|