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

Unified Diff: src/parsing/parser.cc

Issue 1609893003: [es6] Tail calls support. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebasing Created 4 years, 11 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/mips64/code-stubs-mips64.cc ('k') | src/x64/builtins-x64.cc » ('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 dd9744e7f6314d72f1b3b91ad4b28218da7d1225..c3ff9079b21ad232713d4e2c631f770504ac072d 100644
--- a/src/parsing/parser.cc
+++ b/src/parsing/parser.cc
@@ -2807,7 +2807,10 @@ Statement* Parser::ParseReturnStatement(bool* ok) {
is_object_conditional, pos);
}
- return_value->MarkTail();
+ // ES6 14.6.1 Static Semantics: IsInTailPosition
+ if (FLAG_harmony_tailcalls && !is_sloppy(language_mode())) {
+ return_value->MarkTail();
+ }
}
ExpectSemicolon(CHECK_OK);
« no previous file with comments | « src/mips64/code-stubs-mips64.cc ('k') | src/x64/builtins-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698