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

Unified Diff: src/ast.h

Issue 348893007: Allow yield expressions without a RHS. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Update tests, fix function* () { yield* } Created 6 years, 6 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 | « no previous file | src/preparser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast.h
diff --git a/src/ast.h b/src/ast.h
index aecee37b602f922f8629e21dd5cbeb2d9837b608..15be52fb6920a07fd0a2cd7d05e4ea9211d283c4 100644
--- a/src/ast.h
+++ b/src/ast.h
@@ -3368,6 +3368,7 @@ class AstNodeFactory V8_FINAL BASE_EMBEDDED {
Expression* expression,
Yield::Kind yield_kind,
int pos) {
+ if (!expression) expression = NewUndefinedLiteral(pos);
Yield* yield = new(zone_) Yield(
zone_, generator_object, expression, yield_kind, pos);
VISIT_AND_RETURN(Yield, yield)
« no previous file with comments | « no previous file | src/preparser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698