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

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: 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') | test/mjsunit/harmony/generators-parsing.js » ('J')
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 23f9eef477a9a318769ad67256b650e23ca11372..702eabd9263703711e6853ce9fc597bdb07f71f2 100644
--- a/src/ast.h
+++ b/src/ast.h
@@ -3375,6 +3375,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') | test/mjsunit/harmony/generators-parsing.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698