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

Issue 1602013007: Fix handling of escaped "let" and "static" tokens (Closed)

Created:
4 years, 11 months ago by adamk
Modified:
4 years, 11 months ago
Reviewers:
Dan Ehrenberg
CC:
v8-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Fix handling of escaped "let" and "static" tokens The old handling of escaped keywords erroneously treated escaped versions of "let" and "static" as ESCAPED_KEYWORD, leading to erroneous errors in sloppy mode. Moreover, though the class literal parsing code attempted to fix up the parsing of escaped versions of "static" to allow it in the right places, that code wasn't complete. Fixing the scanner to mark escaped "static" as ESCAPED_STRICT_RESERVED_WORD allows simplifying the class literal parsing code. A little extra code was needed to properly handle the new treatment of escaped "let". Note that "yield" is still broken (that is, we're overly restrictive of escaped "yield" in sloppy mode). Committed: https://crrev.com/c04ef1ffcbede41529711b33aef70d5d1738287f Cr-Commit-Position: refs/heads/master@{#33396}

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+45 lines, -38 lines) Patch
M src/parsing/parser-base.h View 9 chunks +9 lines, -35 lines 0 comments Download
M src/parsing/scanner.cc View 1 chunk +3 lines, -1 line 0 comments Download
M test/cctest/test-parsing.cc View 8 chunks +33 lines, -2 lines 2 comments Download

Messages

Total messages: 13 (5 generated)
adamk
4 years, 11 months ago (2016-01-19 19:25:44 UTC) #2
caitp (gmail)
the refactoring looks good https://codereview.chromium.org/1602013007/diff/1/test/cctest/test-parsing.cc File test/cctest/test-parsing.cc (right): https://codereview.chromium.org/1602013007/diff/1/test/cctest/test-parsing.cc#newcode4468 test/cctest/test-parsing.cc:4468: // Escaped 'static' should be ...
4 years, 11 months ago (2016-01-19 21:17:03 UTC) #4
Dan Ehrenberg
lgtm Good change. Funny that we previously had tests which actually checked in the wrong ...
4 years, 11 months ago (2016-01-19 21:21:10 UTC) #6
adamk
Thanks for the reviews https://codereview.chromium.org/1602013007/diff/1/test/cctest/test-parsing.cc File test/cctest/test-parsing.cc (right): https://codereview.chromium.org/1602013007/diff/1/test/cctest/test-parsing.cc#newcode4468 test/cctest/test-parsing.cc:4468: // Escaped 'static' should be ...
4 years, 11 months ago (2016-01-19 21:21:34 UTC) #7
adamk
On 2016/01/19 21:21:10, Dan Ehrenberg wrote: > lgtm > > Good change. Funny that we ...
4 years, 11 months ago (2016-01-19 21:22:33 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1602013007/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1602013007/1
4 years, 11 months ago (2016-01-19 21:22:42 UTC) #10
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 11 months ago (2016-01-19 21:24:04 UTC) #11
commit-bot: I haz the power
4 years, 11 months ago (2016-01-19 21:25:09 UTC) #13
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/c04ef1ffcbede41529711b33aef70d5d1738287f
Cr-Commit-Position: refs/heads/master@{#33396}

Powered by Google App Engine
This is Rietveld 408576698