Chromium Code Reviews| Index: src/interpreter/bytecode-generator.cc |
| diff --git a/src/interpreter/bytecode-generator.cc b/src/interpreter/bytecode-generator.cc |
| index bdc5370f5a30ac5779f65f6999c3470256a712cf..6aaec20b85ca169ee4bc248988a334302bd981d4 100644 |
| --- a/src/interpreter/bytecode-generator.cc |
| +++ b/src/interpreter/bytecode-generator.cc |
| @@ -2260,7 +2260,12 @@ void BytecodeGenerator::VisitYield(Yield* expr) { |
| builder()->Bind(&resume_with_throw); |
| builder()->SetExpressionPosition(expr); |
| - builder()->LoadAccumulatorWithRegister(input).Throw(); |
| + builder()->LoadAccumulatorWithRegister(input); |
| + if (IsAsyncFunction(builder()->literal()->kind())) { |
|
Michael Starzinger
2016/07/07 13:04:35
How would you feel about parameterizing the "Yield
Dan Ehrenberg
2016/07/07 17:57:31
Looking forward to async generators, this is a rea
|
| + builder()->ReThrow(); |
| + } else { |
| + builder()->Throw(); |
| + } |
| builder()->Bind(&resume_with_next); |
| builder()->LoadAccumulatorWithRegister(input); |