Index: src/interpreter/bytecode-generator.cc |
diff --git a/src/interpreter/bytecode-generator.cc b/src/interpreter/bytecode-generator.cc |
index bdc5370f5a30ac5779f65f6999c3470256a712cf..6aa38880b433a020d93e94c9f5484d2c2f60d44f 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 (expr->rethrow_on_exception()) { |
+ builder()->ReThrow(); |
+ } else { |
+ builder()->Throw(); |
+ } |
builder()->Bind(&resume_with_next); |
builder()->LoadAccumulatorWithRegister(input); |