Index: src/parsing/parser.cc |
diff --git a/src/parsing/parser.cc b/src/parsing/parser.cc |
index 0048b8da698b718cc01671f52ab659b905427c2e..5672c5e1e77e07fd4436b5de2971de949085653a 100644 |
--- a/src/parsing/parser.cc |
+++ b/src/parsing/parser.cc |
@@ -2803,7 +2803,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); |