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

Unified Diff: src/parsing/parser.cc

Issue 1962853002: [es8] Prepare explicit tail calls (STC) for staging with implicit tail calls (PTC). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@src-stage
Patch Set: Addressing comments Created 4 years, 7 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/parsing/parser-base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/parser.cc
diff --git a/src/parsing/parser.cc b/src/parsing/parser.cc
index ce3dd20d359310a1b89eda3d05c88551127537d8..3fa6b27451d3db083677117ede77cd0024ad7a8d 100644
--- a/src/parsing/parser.cc
+++ b/src/parsing/parser.cc
@@ -2657,8 +2657,7 @@ Statement* Parser::ParseReturnStatement(bool* ok) {
if (allow_tailcalls() && !is_sloppy(language_mode())) {
// ES6 14.6.1 Static Semantics: IsInTailPosition
- Scanner::Location loc(pos, pos + 1);
- function_state_->AddExpressionInTailPosition(return_value, loc);
+ function_state_->AddImplicitTailCallExpression(return_value);
}
}
}
@@ -2989,7 +2988,7 @@ TryStatement* Parser::ParseTryStatement(bool* ok) {
catch_variable, catch_block, pos);
} else {
if (FLAG_harmony_explicit_tailcalls &&
- !tail_call_expressions_in_catch_block.is_empty()) {
+ tail_call_expressions_in_catch_block.has_explicit_tail_calls()) {
// TODO(ishell): update chapter number.
// ES8 XX.YY.ZZ
ReportMessageAt(tail_call_expressions_in_catch_block.location(),
« no previous file with comments | « no previous file | src/parsing/parser-base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698