Index: src/ast.h |
diff --git a/src/ast.h b/src/ast.h |
index 0882b250ffde424f2f86925d1416c4fa54288f54..f79c2d2b2b0ce1391b64cd4806d4d42e321ba112 100644 |
--- a/src/ast.h |
+++ b/src/ast.h |
@@ -956,11 +956,13 @@ class ForOfStatement V8_FINAL : public ForEachStatement { |
void Initialize(Expression* each, |
Expression* subject, |
Statement* body, |
+ Expression* assign_iterable, |
Expression* assign_iterator, |
Expression* next_result, |
Expression* result_done, |
Expression* assign_each) { |
ForEachStatement::Initialize(each, subject, body); |
+ assign_iterable_ = assign_iterable; |
assign_iterator_ = assign_iterator; |
next_result_ = next_result; |
result_done_ = result_done; |
@@ -971,7 +973,12 @@ class ForOfStatement V8_FINAL : public ForEachStatement { |
return subject(); |
} |
- // var iterator = iterable; |
+ // var iterable = subject; |
+ Expression* assign_iterable() const { |
+ return assign_iterable_; |
+ } |
+ |
+ // var iterator = iterable[Symbol.iterator](); |
Expression* assign_iterator() const { |
return assign_iterator_; |
} |
@@ -1006,6 +1013,7 @@ class ForOfStatement V8_FINAL : public ForEachStatement { |
back_edge_id_(GetNextId(zone)) { |
} |
+ Expression* assign_iterable_; |
Expression* assign_iterator_; |
Expression* next_result_; |
Expression* result_done_; |