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

Issue 615813004: Allow escape sequences in Constructor/Prototype tokens in PreParserTraits::GetSymbol() (Closed)

Created:
6 years, 2 months ago by caitp (gmail)
Modified:
6 years, 1 month ago
CC:
v8-dev
Project:
v8
Visibility:
Public.

Description

Check string literals with escapes in PreParserTraits::GetSymbol() LOG=Y BUG=v8:3606 R=arv@chromium.org, marja@chromium.org Committed: https://code.google.com/p/v8/source/detail?r=24880

Patch Set 1 #

Total comments: 5

Patch Set 2 : Add tests + only check unescaped literals for arguments/eval #

Total comments: 2

Patch Set 3 : Share code between LiteralMatches() and UnescapedLiteralMatches() #

Total comments: 3

Patch Set 4 : Use default parameter + add some extra test cases #

Patch Set 5 : Fixup indentation #

Total comments: 1

Patch Set 6 : Escape backslash in string literals to make msvs happy #

Unified diffs Side-by-side diffs Delta from patch set Stats (+22 lines, -4 lines) Patch
M src/preparser.cc View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M src/scanner.h View 1 2 3 4 5 1 chunk +6 lines, -2 lines 0 comments Download
M test/cctest/test-parsing.cc View 1 2 3 4 5 2 chunks +14 lines, -0 lines 0 comments Download

Messages

Total messages: 24 (1 generated)
caitp (gmail)
Still trying to figure out how to write a test case for this... Work in ...
6 years, 2 months ago (2014-10-01 20:52:18 UTC) #1
arv (Not doing code reviews)
Can you update the test in test-parsing.cc?
6 years, 2 months ago (2014-10-01 20:56:38 UTC) #2
arv (Not doing code reviews)
This seems worth doing. https://codereview.chromium.org/615813004/diff/1/src/preparser.cc File src/preparser.cc (right): https://codereview.chromium.org/615813004/diff/1/src/preparser.cc#newcode75 src/preparser.cc:75: if (scanner->LiteralMatches("eval", 4)) { On ...
6 years, 2 months ago (2014-10-01 21:00:35 UTC) #3
caitp (gmail)
On 2014/10/01 21:00:35, arv wrote: > This seems worth doing. > > https://codereview.chromium.org/615813004/diff/1/src/preparser.cc > File ...
6 years, 2 months ago (2014-10-01 21:12:46 UTC) #4
arv (Not doing code reviews)
On 2014/10/01 21:12:46, caitp wrote: > On 2014/10/01 21:00:35, arv wrote: > > This seems ...
6 years, 2 months ago (2014-10-01 21:20:06 UTC) #5
caitp (gmail)
On 2014/10/01 21:20:06, arv wrote: > On 2014/10/01 21:12:46, caitp wrote: > > On 2014/10/01 ...
6 years, 2 months ago (2014-10-01 21:36:54 UTC) #6
arv (Not doing code reviews)
https://codereview.chromium.org/615813004/diff/20001/test/cctest/test-parsing.cc File test/cctest/test-parsing.cc (right): https://codereview.chromium.org/615813004/diff/20001/test/cctest/test-parsing.cc#newcode3858 test/cctest/test-parsing.cc:3858: "static 'prot\u006ftype'() {}", Can you also add: "static 'prototype'() ...
6 years, 2 months ago (2014-10-01 21:47:01 UTC) #7
arv (Not doing code reviews)
Adding marja since this would need an owner too.
6 years, 2 months ago (2014-10-01 21:47:42 UTC) #9
arv (Not doing code reviews)
https://codereview.chromium.org/615813004/diff/40001/test/cctest/test-parsing.cc File test/cctest/test-parsing.cc (right): https://codereview.chromium.org/615813004/diff/40001/test/cctest/test-parsing.cc#newcode3861 test/cctest/test-parsing.cc:3861: "static *'prot\u006ftype'() {}", One more case: "static prot\u006ftype() {}", ...
6 years, 2 months ago (2014-10-01 21:49:56 UTC) #10
caitp (gmail)
On 2014/10/01 21:49:56, arv wrote: > https://codereview.chromium.org/615813004/diff/40001/test/cctest/test-parsing.cc > File test/cctest/test-parsing.cc (right): > > https://codereview.chromium.org/615813004/diff/40001/test/cctest/test-parsing.cc#newcode3861 > ...
6 years, 2 months ago (2014-10-07 17:28:55 UTC) #11
arv (Not doing code reviews)
LGTM Marja, can you take a look since I am not an owner?
6 years, 2 months ago (2014-10-07 17:30:06 UTC) #12
caitp (gmail)
https://codereview.chromium.org/615813004/diff/80001/src/preparser.cc File src/preparser.cc (right): https://codereview.chromium.org/615813004/diff/80001/src/preparser.cc#newcode81 src/preparser.cc:81: if (scanner->LiteralMatches("prototype", 9)) { actually, given https://people.mozilla.org/~jorendorff/es6-draft.html#sec-names-and-keywords, this same ...
6 years, 2 months ago (2014-10-09 13:38:44 UTC) #13
marja
lgtm (sorry for delay, I'm ooo). arv@ should probably be made an owner :) Depending ...
6 years, 2 months ago (2014-10-09 18:30:11 UTC) #14
caitp (gmail)
On 2014/10/09 18:30:11, marja wrote: > lgtm (sorry for delay, I'm ooo). > > arv@ should ...
6 years, 2 months ago (2014-10-21 04:23:16 UTC) #15
Dmitry Lomov (no reviews)
On 2014/10/21 04:23:16, caitp wrote: > On 2014/10/09 18:30:11, marja wrote: > > lgtm (sorry ...
6 years, 2 months ago (2014-10-24 13:53:25 UTC) #16
caitp (gmail)
On 2014/10/24 13:53:25, Dmitry Lomov (chromium) wrote: > On 2014/10/21 04:23:16, caitp wrote: > > ...
6 years, 2 months ago (2014-10-24 14:03:31 UTC) #17
caitp (gmail)
\\u006f instead?
6 years, 2 months ago (2014-10-24 14:10:52 UTC) #18
caitp (gmail)
dslomov@ if you re-run the windows tests with the updated CL, I think that should ...
6 years, 2 months ago (2014-10-24 14:15:45 UTC) #19
marja
You can also have a look at how I hacked it in StreamingUtf8Script in test-api.cc. ...
6 years, 2 months ago (2014-10-24 14:58:37 UTC) #20
marja
Except that seems like your stuff works better actually :) I should probably add some ...
6 years, 2 months ago (2014-10-24 14:59:23 UTC) #21
Dmitry Lomov (no reviews)
windows builders seem happy, will land this
6 years, 2 months ago (2014-10-24 14:59:58 UTC) #22
Dmitry Lomov (no reviews)
Committed patchset #6 (id:100001) manually as 24880 (presubmit successful).
6 years, 2 months ago (2014-10-24 15:03:54 UTC) #23
marja
6 years, 1 month ago (2014-11-03 14:53:37 UTC) #24
Message was sent while issue was closed.
Btw, I was confused. Our use cases for putting unicode into the tests are not
the same. You want the test to read \uaaaa (so you need to write "\\uaaaa" into
the code), whereas in my tests I want the raw bytes of the unicode character to
be there in the test (so I could write \uaaaa if Windows liked it, but as it
doesn't, I need to write \xaa\xbb\xcc. Sry for the noise.

Powered by Google App Engine
This is Rietveld 408576698