Index: src/hydrogen.cc |
diff --git a/src/hydrogen.cc b/src/hydrogen.cc |
index bbcdd3b7b90a76ac01728da4a5782524cd902878..aef8a76b5c1779a1959824bb35c308f2ed0f53b3 100644 |
--- a/src/hydrogen.cc |
+++ b/src/hydrogen.cc |
@@ -3805,6 +3805,10 @@ void HOptimizedGraphBuilder::VisitExpressions( |
bool HOptimizedGraphBuilder::BuildGraph() { |
+ if (info()->function()->is_generator()) { |
+ Bailout("function is a generator"); |
+ return false; |
+ } |
Scope* scope = info()->scope(); |
if (scope->HasIllegalRedeclaration()) { |
Bailout("function with illegal redeclaration"); |
@@ -6665,6 +6669,12 @@ void HOptimizedGraphBuilder::VisitAssignment(Assignment* expr) { |
} |
+void HOptimizedGraphBuilder::VisitYield(Yield* expr) { |
+ // Generators are not optimized, so we should never get here. |
+ UNREACHABLE(); |
+} |
+ |
+ |
void HOptimizedGraphBuilder::VisitThrow(Throw* expr) { |
ASSERT(!HasStackOverflow()); |
ASSERT(current_block() != NULL); |