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

Unified Diff: src/parsing/parser-base.h

Issue 1921083002: [es6] Fix tail call elimination in single-expression arrow functions. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressing comments Created 4 years, 8 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 | « src/parsing/parser.cc ('k') | src/parsing/preparser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/parser-base.h
diff --git a/src/parsing/parser-base.h b/src/parsing/parser-base.h
index 27b9764434c5364ff18c9cf561acde122b80090d..7f8fd719432a7b306308ece55599b4d0f441025d 100644
--- a/src/parsing/parser-base.h
+++ b/src/parsing/parser-base.h
@@ -2863,6 +2863,10 @@ ParserBase<Traits>::ParseArrowFunctionLiteral(
body->Add(factory()->NewReturnStatement(expression, pos), zone());
materialized_literal_count = function_state.materialized_literal_count();
expected_property_count = function_state.expected_property_count();
+ // ES6 14.6.1 Static Semantics: IsInTailPosition
+ if (allow_tailcalls() && !is_sloppy(language_mode())) {
+ this->MarkTailPosition(expression);
+ }
}
super_loc = function_state.super_location();
« no previous file with comments | « src/parsing/parser.cc ('k') | src/parsing/preparser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698