Index: src/parser.cc |
diff --git a/src/parser.cc b/src/parser.cc |
index 33b5fab3fc8c6b9cd198a99384fe4bf60111d738..35f2323d77572b13af7f568058baff33d3a77c6f 100644 |
--- a/src/parser.cc |
+++ b/src/parser.cc |
@@ -3113,7 +3113,12 @@ Expression* Parser::ParseYieldExpression(bool* ok) { |
Expression* generator_object = factory()->NewVariableProxy( |
current_function_state_->generator_object_variable()); |
Expression* expression = ParseAssignmentExpression(false, CHECK_OK); |
- return factory()->NewYield(generator_object, expression, kind, position); |
+ Yield* yield = |
+ factory()->NewYield(generator_object, expression, kind, position); |
+ if (kind == Yield::DELEGATING) { |
+ yield->set_index(current_function_state_->NextHandlerIndex()); |
+ } |
+ return yield; |
} |