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

Unified Diff: src/parsing/preparser.h

Issue 1491923003: Improve rendering of callsite with non-function target. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix tests Created 5 years 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/parsing/pattern-rewriter.cc ('k') | src/runtime/runtime-internal.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/preparser.h
diff --git a/src/parsing/preparser.h b/src/parsing/preparser.h
index d35c439619b2e8722728a1950a2c11315a9af10d..0b41e3bfe817c98ee51de84cc72ea59e267e7288 100644
--- a/src/parsing/preparser.h
+++ b/src/parsing/preparser.h
@@ -1645,7 +1645,7 @@ class PreParserTraits {
PreParserFactory* factory = NULL);
PreParserExpression GetIterator(PreParserExpression iterable,
- PreParserFactory* factory) {
+ PreParserFactory* factory, int pos) {
return PreParserExpression::Default();
}
@@ -3120,8 +3120,12 @@ ParserBase<Traits>::ParseYieldExpression(ExpressionClassifier* classifier,
}
if (kind == Yield::kDelegating) {
// var iterator = subject[Symbol.iterator]();
- expression = this->GetIterator(expression, factory());
+ // Hackily disambiguate o from o.next and o [Symbol.iterator]().
+ // TODO(verwaest): Come up with a better solution.
+ expression = this->GetIterator(expression, factory(), pos + 1);
}
+ // Hackily disambiguate o from o.next and o [Symbol.iterator]().
+ // TODO(verwaest): Come up with a better solution.
typename Traits::Type::YieldExpression yield =
factory()->NewYield(generator_object, expression, kind, pos);
return yield;
« no previous file with comments | « src/parsing/pattern-rewriter.cc ('k') | src/runtime/runtime-internal.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698