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); |