Commit 46cb812f authored by Kevin Gibbons's avatar Kevin Gibbons Committed by Commit Bot

[parser] Turn on --harmony-template-escapes by default

This flag allows invalid escape sequences in tagged templates, which is
a stage-4 TC39 proposal shipping in other browsers.

Bug: v8:5546
Cq-Include-Trybots: master.tryserver.v8:v8_linux_noi18n_rel_ng
Change-Id: I3e7c374c9b547f62d5976f76a7208d05fe9decf8
Reviewed-on: https://chromium-review.googlesource.com/581885
Commit-Queue: Kevin Gibbons <bakkot@gmail.com>
Reviewed-by: 's avatarAdam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47584}
parent 4e453429
......@@ -211,8 +211,6 @@ DEFINE_IMPLICATION(es_staging, harmony)
V(harmony_function_tostring, "harmony Function.prototype.toString") \
V(harmony_regexp_named_captures, "harmony regexp named captures") \
V(harmony_regexp_property, "harmony Unicode regexp property classes") \
V(harmony_template_escapes, \
"harmony invalid escapes in tagged template literals") \
V(harmony_restrict_constructor_return, \
"harmony disallow non undefined primitive return value from class " \
"constructor") \
......@@ -228,7 +226,9 @@ DEFINE_IMPLICATION(es_staging, harmony)
V(harmony_object_rest_spread, "harmony object rest spread properties") \
V(harmony_sharedarraybuffer, "harmony sharedarraybuffer") \
V(harmony_regexp_dotall, "harmony regexp dotAll flag") \
V(harmony_regexp_lookbehind, "harmony regexp lookbehind")
V(harmony_regexp_lookbehind, "harmony regexp lookbehind") \
V(harmony_template_escapes, \
"harmony invalid escapes in tagged template literals")
// Once a shipping feature has proved stable in the wild, it will be dropped
// from HARMONY_SHIPPING, all occurrences of the FLAG_ variable are removed,
......
......@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --no-harmony-template-escapes
function tag() {}
tag(tag`\xyy`);
......@@ -2,7 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
*%(basename)s:7: SyntaxError: Invalid hexadecimal escape sequence
*%(basename)s:9: SyntaxError: Invalid hexadecimal escape sequence
tag(tag`\xyy`);
^^^^
SyntaxError: Invalid hexadecimal escape sequence
......@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --no-harmony-template-escapes
function tag() {}
`${tag`\xyy`}`;
......@@ -2,7 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
*%(basename)s:7: SyntaxError: Invalid hexadecimal escape sequence
*%(basename)s:9: SyntaxError: Invalid hexadecimal escape sequence
`${tag`\xyy`}`;
^^^^
SyntaxError: Invalid hexadecimal escape sequence
......@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --no-harmony-template-escapes
var num = 5;
var str = "str";
function fn() { return "result"; }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment