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

Issue 2665513002: [parser] Lift template literal invalid escape restriction (Closed)

Created:
3 years, 10 months ago by bakkot1
Modified:
3 years, 10 months ago
Reviewers:
adamk, vogelheim
CC:
v8-reviews_googlegroups.com, Michael Hablich
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[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} Committed: https://chromium.googlesource.com/v8/v8/+/18e4c46de5c5269ed1a23219a9cefbd7d3a2a449

Patch Set 1 #

Patch Set 2 : Update test262.status #

Patch Set 3 : rebase #

Patch Set 4 : rebase harder #

Total comments: 10

Patch Set 5 : address comments #

Total comments: 2

Patch Set 6 : rebase #

Patch Set 7 : fix error and test more #

Patch Set 8 : handle octals correctly #

Patch Set 9 : add test #

Total comments: 9

Patch Set 10 : rebase #

Patch Set 11 : rebase actually #

Patch Set 12 : address comments #

Total comments: 5

Patch Set 13 : address comments #

Patch Set 14 : rebase again, almost certainly not necessary #

Total comments: 2

Patch Set 15 : remove DCHECK_EQ to avoid compile errors in release builds #

Patch Set 16 : reintroduce DCHECK_EQ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1098 lines, -42 lines) Patch
M src/bootstrapper.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +2 lines, -0 lines 0 comments Download
M src/flag-definitions.h View 1 2 3 4 5 6 7 8 9 1 chunk +7 lines, -5 lines 0 comments Download
M src/parsing/parser.h View 1 2 3 4 5 6 7 8 9 1 chunk +9 lines, -1 line 0 comments Download
M src/parsing/parser.cc View 1 2 3 4 5 6 7 8 9 2 chunks +11 lines, -5 lines 0 comments Download
M src/parsing/parser-base.h View 1 2 3 4 5 6 7 8 9 10 11 13 chunks +37 lines, -22 lines 0 comments Download
M src/parsing/preparser.h View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -1 line 0 comments Download
M src/parsing/scanner.h View 1 2 3 4 5 6 7 12 3 chunks +21 lines, -0 lines 0 comments Download
M src/parsing/scanner.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 5 chunks +58 lines, -7 lines 0 comments Download
M test/cctest/test-parsing.cc View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +161 lines, -0 lines 0 comments Download
M test/mjsunit/compiler/literals.js View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -0 lines 0 comments Download
A test/mjsunit/harmony/template-escapes.js View 1 chunk +785 lines, -0 lines 0 comments Download
M test/test262/test262.status View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 47 (24 generated)
bakkot1
PTAL
3 years, 10 months ago (2017-01-27 23:25:25 UTC) #3
adamk
Am at a bunch of conferences this week, hope to get to this soon (Monday ...
3 years, 10 months ago (2017-02-01 18:14:47 UTC) #4
adamk
Sorry I didn't punt this before, but I think vogelheim is going to be a ...
3 years, 10 months ago (2017-02-07 20:55:13 UTC) #6
vogelheim
Thanks for working on this! I'm looking forward to better spec coverage! ----------------------------- I must ...
3 years, 10 months ago (2017-02-13 17:36:06 UTC) #7
adamk
https://codereview.chromium.org/2665513002/diff/60001/src/bootstrapper.cc File src/bootstrapper.cc (right): https://codereview.chromium.org/2665513002/diff/60001/src/bootstrapper.cc#newcode4131 src/bootstrapper.cc:4131: static const char* harmony_template_escapes_natives[] = {nullptr}; On 2017/02/13 17:36:06, ...
3 years, 10 months ago (2017-02-13 19:14:10 UTC) #8
bakkot1
On 2017/02/13 17:36:06, vogelheim wrote: > Thanks for working on this! I'm looking forward to ...
3 years, 10 months ago (2017-02-13 20:22:03 UTC) #9
bakkot1
https://codereview.chromium.org/2665513002/diff/60001/src/parsing/parser-base.h File src/parsing/parser-base.h (right): https://codereview.chromium.org/2665513002/diff/60001/src/parsing/parser-base.h#newcode1230 src/parsing/parser-base.h:1230: template <bool tagged> On 2017/02/13 17:36:06, vogelheim wrote: > ...
3 years, 10 months ago (2017-02-13 20:22:25 UTC) #10
vogelheim
When I run this locally, I get a check failure in mjsunit/compiler/literals. Please have a ...
3 years, 10 months ago (2017-02-17 16:33:53 UTC) #15
vogelheim
On 2017/02/13 20:22:03, bakkot1 wrote: > On 2017/02/13 17:36:06, vogelheim wrote: > > Thanks for ...
3 years, 10 months ago (2017-02-17 16:35:33 UTC) #16
bakkot1
Addressed comments; see below. PTAL. I also noticed and corrected a bug from master: we ...
3 years, 10 months ago (2017-02-17 20:42:18 UTC) #17
bakkot1
Oh, I forgot to mention: the DCHECK was an actual failure; I hadn't accounted for ...
3 years, 10 months ago (2017-02-17 21:05:59 UTC) #18
vogelheim
Almost there, only a few mostly mechanical nitpicks left... :) https://codereview.chromium.org/2665513002/diff/150001/src/parsing/parser-base.h File src/parsing/parser-base.h (right): https://codereview.chromium.org/2665513002/diff/150001/src/parsing/parser-base.h#newcode884 ...
3 years, 10 months ago (2017-02-20 11:23:23 UTC) #19
vogelheim
On 2017/02/17 20:42:18, bakkot1 wrote: > > I guess I'd be happier if the spec ...
3 years, 10 months ago (2017-02-20 11:30:19 UTC) #20
bakkot1
Addressed more comments, PTAL. > The idea that validity of a token depends on the ...
3 years, 10 months ago (2017-02-21 21:54:15 UTC) #25
vogelheim
lgtm lgtm. Thanks for implementing this, and thanks for working through the review comments. :-) ...
3 years, 10 months ago (2017-02-22 10:03:02 UTC) #28
bakkot1
https://codereview.chromium.org/2665513002/diff/210001/src/parsing/scanner.cc File src/parsing/scanner.cc (right): https://codereview.chromium.org/2665513002/diff/210001/src/parsing/scanner.cc#newcode1075 src/parsing/scanner.cc:1075: ScanEscape<capture_raw, in_template_literal>(); On 2017/02/22 10:03:02, vogelheim wrote: > Maybe: ...
3 years, 10 months ago (2017-02-22 20:23:53 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2665513002/230001
3 years, 10 months ago (2017-02-22 20:28:32 UTC) #34
bakkot1
https://codereview.chromium.org/2665513002/diff/210001/src/parsing/scanner.cc File src/parsing/scanner.cc (right): https://codereview.chromium.org/2665513002/diff/210001/src/parsing/scanner.cc#newcode1075 src/parsing/scanner.cc:1075: ScanEscape<capture_raw, in_template_literal>(); On 2017/02/22 20:23:53, bakkot1 wrote: > On ...
3 years, 10 months ago (2017-02-22 20:41:14 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2665513002/270001
3 years, 10 months ago (2017-02-22 20:41:29 UTC) #38
adamk
https://codereview.chromium.org/2665513002/diff/250001/src/parsing/scanner.cc File src/parsing/scanner.cc (right): https://codereview.chromium.org/2665513002/diff/250001/src/parsing/scanner.cc#newcode1116 src/parsing/scanner.cc:1116: DCHECK_EQ(!success, has_error()); You could add USE(success); to avoid the ...
3 years, 10 months ago (2017-02-22 20:45:36 UTC) #39
bakkot1
https://codereview.chromium.org/2665513002/diff/250001/src/parsing/scanner.cc File src/parsing/scanner.cc (right): https://codereview.chromium.org/2665513002/diff/250001/src/parsing/scanner.cc#newcode1116 src/parsing/scanner.cc:1116: DCHECK_EQ(!success, has_error()); On 2017/02/22 20:45:36, adamk wrote: > You ...
3 years, 10 months ago (2017-02-22 20:56:44 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2665513002/290001
3 years, 10 months ago (2017-02-22 20:57:19 UTC) #44
commit-bot: I haz the power
3 years, 10 months ago (2017-02-22 21:20:40 UTC) #47
Message was sent while issue was closed.
Committed patchset #16 (id:290001) as
https://chromium.googlesource.com/v8/v8/+/18e4c46de5c5269ed1a23219a9cefbd7d3a...

Powered by Google App Engine
This is Rietveld 408576698