Index: src/parsing/parser.cc |
diff --git a/src/parsing/parser.cc b/src/parsing/parser.cc |
index 1115144aa7d7a6917ffb749b6ea9dc8056d12871..ecc1e20059d1835a94ad98e61bbc913619d56c34 100644 |
--- a/src/parsing/parser.cc |
+++ b/src/parsing/parser.cc |
@@ -1909,6 +1909,7 @@ Statement* Parser::InitializeForEachStatement(ForEachStatement* stmt, |
body = block; |
each = factory()->NewVariableProxy(temp); |
} |
+ MarkExpressionAsAssigned(each); |
stmt->AsForInStatement()->Initialize(each, subject, body); |
} |
return stmt; |
@@ -2058,8 +2059,8 @@ Statement* Parser::InitializeForOfStatement(ForOfStatement* for_of, |
const int nopos = kNoSourcePosition; |
auto avfactory = ast_value_factory(); |
- Variable* iterator = NewTemporary(ast_value_factory()->dot_iterator_string()); |
- Variable* result = NewTemporary(ast_value_factory()->dot_result_string()); |
+ Variable* iterator = NewTemporary(avfactory->dot_iterator_string()); |
+ Variable* result = NewTemporary(avfactory->dot_result_string()); |
Variable* completion = NewTemporary(avfactory->empty_string()); |
// iterator = GetIterator(iterable) |