Chromium Code Reviews| Index: src/hydrogen.cc |
| diff --git a/src/hydrogen.cc b/src/hydrogen.cc |
| index bbcdd3b7b90a76ac01728da4a5782524cd902878..6e558be5c87583c358b6c581b0cf00ff62a4c3c7 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"); |
| @@ -4810,6 +4814,12 @@ void HOptimizedGraphBuilder::VisitReturnStatement(ReturnStatement* stmt) { |
| } |
| +void HOptimizedGraphBuilder::VisitYield(Yield* expr) { |
|
Michael Starzinger
2013/03/14 22:29:24
Move this method away from the statement visitors
|
| + // Generators are not optimized, so we should never get here. |
| + UNREACHABLE(); |
| +} |
| + |
| + |
| void HOptimizedGraphBuilder::VisitWithStatement(WithStatement* stmt) { |
| ASSERT(!HasStackOverflow()); |
| ASSERT(current_block() != NULL); |