Index: src/crankshaft/hydrogen.cc |
diff --git a/src/crankshaft/hydrogen.cc b/src/crankshaft/hydrogen.cc |
index 76d1ef51e2c3f9d666a654a4ab808b8c25f7579b..39728cd13a8e1afbc011fe58e4c16b2c5729f19c 100644 |
--- a/src/crankshaft/hydrogen.cc |
+++ b/src/crankshaft/hydrogen.cc |
@@ -158,6 +158,11 @@ HCompilationJob::Status HCompilationJob::CreateGraphImpl() { |
return AbortOptimization(kTooManyParametersLocals); |
} |
+ if (IsGeneratorFunction(info()->shared_info()->kind())) { |
+ // Crankshaft does not support generators. |
+ return AbortOptimization(kGenerator); |
+ } |
+ |
if (FLAG_trace_hydrogen) { |
isolate()->GetHTracer()->TraceCompilation(info()); |
} |