New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Closed: Sep 2017
Cc:
Components:
HW: ----
NextAction: ----
OS: ----
Priority: 2
Type: Bug

Blocked on:
issue 6029



Sign in to add a comment
link

Issue 5546: Lift template literal invalid escape sequence restriction

Reported by littledan@chromium.org, Oct 19 2016 Project Member

Issue description

The proposal at https://github.com/tc39/proposal-template-literal-revision has reached Stage 3 at TC39. There are test262 tests, such as language/expressions/tagged-template/invalid-escape-sequences , which test for the new behavior that are currently failing.
 

Comment 1 by adamk@chromium.org, Oct 19 2016

Cc: adamk@chromium.org
Owner: l...@chromium.org
Status: Assigned (was: Available)
I talked with lpy about possibly picking this up, so assigning to him for now.

Comment 2 by bak...@gmail.com, Jan 7 2017

I'd like to take this, if it's not actively being worked on.

Comment 3 by adamk@chromium.org, Jan 10 2017

Cc: l...@chromium.org
Owner: adamk@chromium.org
Go for it; assigning to myself for now due to monorail restrictions.

Comment 4 by bugdroid1@chromium.org, Feb 22 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/18e4c46de5c5269ed1a23219a9cefbd7d3a2a449

commit 18e4c46de5c5269ed1a23219a9cefbd7d3a2a449
Author: bakkot <bakkot@gmail.com>
Date: Wed Feb 22 21:20:32 2017

[parser] Lift template literal invalid escape restriction

This implements the proposal at
https://github.com/tc39/proposal-template-literal-revision
staged behind a flag --harmony-template-escapes. The proposal allows
invalid octal, unicode, and hexadecimal escape sequences to appear in
tagged template literals, instead of being a syntax error. These have
a 'cooked' value of 'undefined', but are still accessible through the
'raw' property.

BUG= v8:5546 

Review-Url: https://codereview.chromium.org/2665513002
Cr-Commit-Position: refs/heads/master@{#43384}

[modify] https://crrev.com/18e4c46de5c5269ed1a23219a9cefbd7d3a2a449/src/bootstrapper.cc
[modify] https://crrev.com/18e4c46de5c5269ed1a23219a9cefbd7d3a2a449/src/flag-definitions.h
[modify] https://crrev.com/18e4c46de5c5269ed1a23219a9cefbd7d3a2a449/src/parsing/parser-base.h
[modify] https://crrev.com/18e4c46de5c5269ed1a23219a9cefbd7d3a2a449/src/parsing/parser.cc
[modify] https://crrev.com/18e4c46de5c5269ed1a23219a9cefbd7d3a2a449/src/parsing/parser.h
[modify] https://crrev.com/18e4c46de5c5269ed1a23219a9cefbd7d3a2a449/src/parsing/preparser.h
[modify] https://crrev.com/18e4c46de5c5269ed1a23219a9cefbd7d3a2a449/src/parsing/scanner.cc
[modify] https://crrev.com/18e4c46de5c5269ed1a23219a9cefbd7d3a2a449/src/parsing/scanner.h
[modify] https://crrev.com/18e4c46de5c5269ed1a23219a9cefbd7d3a2a449/test/cctest/test-parsing.cc
[modify] https://crrev.com/18e4c46de5c5269ed1a23219a9cefbd7d3a2a449/test/mjsunit/compiler/literals.js
[add] https://crrev.com/18e4c46de5c5269ed1a23219a9cefbd7d3a2a449/test/mjsunit/harmony/template-escapes.js
[modify] https://crrev.com/18e4c46de5c5269ed1a23219a9cefbd7d3a2a449/test/test262/test262.status

Comment 5 Deleted

Comment 6 Deleted

Comment 7 Deleted

Comment 8 by l446240525@gmail.com, Feb 27 2017

😢😢😢

Comment 9 by hablich@chromium.org, Mar 3 2017

Blockedon: 6029

Comment 10 by bugdroid1@chromium.org, Mar 3 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/baa74e89b6927917f911aab0e0823c8e0234aaa2

commit baa74e89b6927917f911aab0e0823c8e0234aaa2
Author: bakkot <bakkot@gmail.com>
Date: Fri Mar 03 22:08:57 2017

[parser] Correctly handle invalid escapes in adjacent template tokens.

A previous patch lifting the restriction on invalid escape sequences in
tagged templates had a bug when two template tokens appeared immediately
adject to each other. This moves invalid escape information from the
tokenizer state proper into the TokenDesc, preventing the overwriting
which caused this issue.

Previous CL is at
https://codereview.chromium.org/2665513002

BUG= v8:6029 , v8:5546 

Review-Url: https://codereview.chromium.org/2724003006
Cr-Commit-Position: refs/heads/master@{#43596}

[modify] https://crrev.com/baa74e89b6927917f911aab0e0823c8e0234aaa2/src/parsing/parser-base.h
[modify] https://crrev.com/baa74e89b6927917f911aab0e0823c8e0234aaa2/src/parsing/scanner.cc
[modify] https://crrev.com/baa74e89b6927917f911aab0e0823c8e0234aaa2/src/parsing/scanner.h
[modify] https://crrev.com/baa74e89b6927917f911aab0e0823c8e0234aaa2/test/cctest/test-parsing.cc
[modify] https://crrev.com/baa74e89b6927917f911aab0e0823c8e0234aaa2/test/mjsunit/harmony/template-escapes.js

Comment 11 by hablich@chromium.org, Mar 23 2017

Labels: Priority-2

Comment 12 by bugdroid1@chromium.org, Aug 24 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/46cb812fa10233fc0c3c638ff60f2c4f176c1fe2

commit 46cb812fa10233fc0c3c638ff60f2c4f176c1fe2
Author: Kevin Gibbons <bakkot@gmail.com>
Date: Thu Aug 24 20:05:03 2017

[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: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47584}
[modify] https://crrev.com/46cb812fa10233fc0c3c638ff60f2c4f176c1fe2/src/flag-definitions.h
[modify] https://crrev.com/46cb812fa10233fc0c3c638ff60f2c4f176c1fe2/test/message/regress/regress-4829-1.js
[modify] https://crrev.com/46cb812fa10233fc0c3c638ff60f2c4f176c1fe2/test/message/regress/regress-4829-1.out
[modify] https://crrev.com/46cb812fa10233fc0c3c638ff60f2c4f176c1fe2/test/message/regress/regress-4829-2.js
[modify] https://crrev.com/46cb812fa10233fc0c3c638ff60f2c4f176c1fe2/test/message/regress/regress-4829-2.out
[modify] https://crrev.com/46cb812fa10233fc0c3c638ff60f2c4f176c1fe2/test/mjsunit/es6/templates.js

Comment 13 by adamk@chromium.org, Sep 12 2017

Status: Fixed (was: Assigned)

Comment 14 by bugdroid1@chromium.org, Nov 28 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/b20dc7690919eaba645d74b910af7905e973f9d8

commit b20dc7690919eaba645d74b910af7905e973f9d8
Author: Adam Klein <adamk@chromium.org>
Date: Tue Nov 28 18:36:41 2017

Remove always-on --harmony-template-escapes flag

It was shipped in Chrome 62.

Bug:  v8:5546 ,  v8:4829 
Cq-Include-Trybots: master.tryserver.v8:v8_linux_noi18n_rel_ng
Change-Id: I3ac318639f1f7483d4d4f4fe5606387a856be98a
Reviewed-on: https://chromium-review.googlesource.com/777940
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49687}
[modify] https://crrev.com/b20dc7690919eaba645d74b910af7905e973f9d8/src/bootstrapper.cc
[modify] https://crrev.com/b20dc7690919eaba645d74b910af7905e973f9d8/src/flag-definitions.h
[modify] https://crrev.com/b20dc7690919eaba645d74b910af7905e973f9d8/src/parsing/parser-base.h
[modify] https://crrev.com/b20dc7690919eaba645d74b910af7905e973f9d8/src/parsing/parser.cc
[modify] https://crrev.com/b20dc7690919eaba645d74b910af7905e973f9d8/src/parsing/parser.h
[modify] https://crrev.com/b20dc7690919eaba645d74b910af7905e973f9d8/test/cctest/test-parsing.cc
[delete] https://crrev.com/e1913d542ee45edd105a2e2a923264db770ef591/test/message/regress/fail/regress-4829-1.js
[delete] https://crrev.com/e1913d542ee45edd105a2e2a923264db770ef591/test/message/regress/fail/regress-4829-1.out
[delete] https://crrev.com/e1913d542ee45edd105a2e2a923264db770ef591/test/message/regress/fail/regress-4829-2.js
[delete] https://crrev.com/e1913d542ee45edd105a2e2a923264db770ef591/test/message/regress/fail/regress-4829-2.out
[modify] https://crrev.com/b20dc7690919eaba645d74b910af7905e973f9d8/test/mjsunit/es6/templates.js
[rename] https://crrev.com/b20dc7690919eaba645d74b910af7905e973f9d8/test/mjsunit/es9/template-escapes.js
[modify] https://crrev.com/b20dc7690919eaba645d74b910af7905e973f9d8/test/mjsunit/harmony/regress/regress-6100.js
[modify] https://crrev.com/b20dc7690919eaba645d74b910af7905e973f9d8/test/test262/test262.status

Sign in to add a comment