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

Issue 2240513003: Scanner::LiteralBuffer usage cleanup. (Closed)

Created:
4 years, 4 months ago by vogelheim
Modified:
4 years, 4 months ago
Reviewers:
marja
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

Scanner::LiteralBuffer usage cleanup. 1, restrict use of LiteralBuffers to the tokens that actually need it. - E.g., previously the Token::FUNCTION would have a literal buffer containing "function", which was never actually used. - This eliminates copies of the string data for every call to PeekAhead or SetBookmark. 2, document & enforce the "secret" Scanner API contract w/ DCHECK - Document & check the correspondence of token value and literal buffer. - Document & check preconditions for calling PeekAhead, ScanRegExp*, ScanTemplate*. BUG=v8:4947 Committed: https://crrev.com/c677f813814f5ead481fc2c91f7834989abccd25 Cr-Commit-Position: refs/heads/master@{#38677}

Patch Set 1 #

Patch Set 2 : Fix handling of surrogates that are really ASCII. #

Patch Set 3 : Avoid int conversion issues w/ some compilers. #

Patch Set 4 : Avoid more int conversion & compiler issues w/ some other compilers. #

Total comments: 4

Patch Set 5 : Feedback fix compiler issues. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+144 lines, -46 lines) Patch
M src/parsing/parser-base.h View 4 chunks +7 lines, -8 lines 0 comments Download
M src/parsing/scanner.h View 1 2 6 chunks +36 lines, -16 lines 0 comments Download
M src/parsing/scanner.cc View 1 2 3 4 12 chunks +83 lines, -21 lines 0 comments Download
M src/parsing/token.h View 3 chunks +7 lines, -0 lines 0 comments Download
M src/parsing/token.cc View 1 2 3 4 1 chunk +10 lines, -0 lines 0 comments Download
M test/cctest/test-parsing.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 53 (45 generated)
vogelheim
ptal. (I still need to fix the Win compiler issue w/ constexpr.)
4 years, 4 months ago (2016-08-12 18:08:20 UTC) #24
marja
lgtm I guess we used to have literals for "function" etc since we just collected ...
4 years, 4 months ago (2016-08-16 07:20:43 UTC) #25
vogelheim
https://codereview.chromium.org/2240513003/diff/80001/src/parsing/scanner.cc File src/parsing/scanner.cc (left): https://codereview.chromium.org/2240513003/diff/80001/src/parsing/scanner.cc#oldcode1247 src/parsing/scanner.cc:1247: if (escaped) { \ On 2016/08/16 07:20:42, marja wrote: ...
4 years, 4 months ago (2016-08-16 07:24:21 UTC) #26
vogelheim
https://codereview.chromium.org/2240513003/diff/80001/src/parsing/scanner.cc File src/parsing/scanner.cc (right): https://codereview.chromium.org/2240513003/diff/80001/src/parsing/scanner.cc#newcode762 src/parsing/scanner.cc:762: DCHECK(token.raw_literal_chars != nullptr); On 2016/08/16 07:20:42, marja wrote: > ...
4 years, 4 months ago (2016-08-17 08:52:42 UTC) #41
vogelheim
On 2016/08/16 07:20:43, marja wrote: > lgtm > > I guess we used to have ...
4 years, 4 months ago (2016-08-17 08:54:45 UTC) #42
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/2240513003/140001
4 years, 4 months ago (2016-08-17 10:04:04 UTC) #49
commit-bot: I haz the power
Committed patchset #5 (id:140001)
4 years, 4 months ago (2016-08-17 10:08:44 UTC) #51
commit-bot: I haz the power
4 years, 4 months ago (2016-08-17 10:09:06 UTC) #53
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/c677f813814f5ead481fc2c91f7834989abccd25
Cr-Commit-Position: refs/heads/master@{#38677}

Powered by Google App Engine
This is Rietveld 408576698