Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Unified Diff: src/preparser.h

Issue 430693003: yield* calls @@iterator on iterable (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Removed extra flag from test Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/parser.cc ('k') | test/mjsunit/harmony/generators-iteration.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/preparser.h
diff --git a/src/preparser.h b/src/preparser.h
index d1d1c53e0b16979d91c4d233b1dd0e3096e1f1f1..6058f89cc025d29f35bd09046ea9d4956cb6a081 100644
--- a/src/preparser.h
+++ b/src/preparser.h
@@ -1232,6 +1232,11 @@ class PreParserTraits {
Scanner* scanner,
PreParserFactory* factory = NULL);
+ PreParserExpression GetIterator(PreParserExpression iterable,
+ PreParserFactory* factory) {
+ return PreParserExpression::Default();
+ }
+
static PreParserExpressionList NewExpressionList(int size, void* zone) {
return PreParserExpressionList();
}
@@ -2094,6 +2099,10 @@ ParserBase<Traits>::ParseYieldExpression(bool* ok) {
break;
}
}
+ if (kind == Yield::DELEGATING) {
+ // var iterator = subject[Symbol.iterator]();
+ expression = this->GetIterator(expression, factory());
+ }
typename Traits::Type::YieldExpression yield =
factory()->NewYield(generator_object, expression, kind, pos);
if (kind == Yield::DELEGATING) {
« no previous file with comments | « src/parser.cc ('k') | test/mjsunit/harmony/generators-iteration.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698