Commit 949a5d1e authored by Georg Neis's avatar Georg Neis Committed by Commit Bot

[ast] Simplify NewYieldStar.

yield* always has an argument.

R=rmcilroy@chromium.org

Bug: 
Change-Id: I5d14c0db05b1e1b873831e0f5a18ec479c1399c9
Reviewed-on: https://chromium-review.googlesource.com/566816Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46564}
parent 7b080310
......@@ -3493,7 +3493,7 @@ class AstNodeFactory final BASE_EMBEDDED {
}
YieldStar* NewYieldStar(Expression* expression, int pos, SuspendFlags flags) {
if (!expression) expression = NewUndefinedLiteral(pos);
DCHECK_NOT_NULL(expression);
return new (zone_) YieldStar(expression, pos, flags);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment