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

Issue 588893006: gn: attach comments to parse tree (Closed)

Created:
6 years, 3 months ago by scottmg
Modified:
6 years, 3 months ago
Reviewers:
brettw
CC:
chromium-reviews, tfarina
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

gn: attach comments to parse tree (Split off of https://codereview.chromium.org/588813002) The main change here is to restructure the ParseNode tree to include comments. Comments are not included in the tree as normal nodes, but instead attached subordinate to other |ParseNode|s. This is useful for two reasons: - it means neither the evaluator nor the main code of the parser need to get more complicated, as they do not need to constantly consider comments. - it confers additional information about the relative location of of the comments to their surrounding code when (in the future) outputting the formatted code. Comments are added in relation to the node they're attached to as before, after, or suffix. This is so that formatting can keep them attached to the correct thing when things are reflowed. Timing data (Windows, Release): Before: Done. Wrote 1618 targets from 530 files in 2613ms Done. Wrote 1618 targets from 530 files in 2952ms Done. Wrote 1618 targets from 530 files in 3093ms After: Done. Wrote 1618 targets from 530 files in 2767ms Done. Wrote 1618 targets from 530 files in 3120ms Done. Wrote 1618 targets from 530 files in 2872ms So, it seems within the noise at this point. R=brettw@chromium.org BUG=348474 Committed: https://crrev.com/be5d45107aeffccffa607908399ca0ae20512589 Cr-Commit-Position: refs/heads/master@{#296331}

Patch Set 1 #

Patch Set 2 : tidy #

Patch Set 3 : suffix comments too #

Total comments: 12

Patch Set 4 : review fixes #

Patch Set 5 : x64 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+435 lines, -54 lines) Patch
M tools/gn/c_include_iterator.cc View 1 chunk +8 lines, -3 lines 0 comments Download
M tools/gn/header_checker.cc View 1 chunk +8 lines, -5 lines 0 comments Download
M tools/gn/location.h View 1 2 3 2 chunks +5 lines, -3 lines 0 comments Download
M tools/gn/location.cc View 1 2 3 1 chunk +6 lines, -2 lines 0 comments Download
M tools/gn/parse_tree.h View 2 chunks +40 lines, -0 lines 0 comments Download
M tools/gn/parse_tree.cc View 1 2 3 11 chunks +43 lines, -4 lines 0 comments Download
M tools/gn/parse_tree_unittest.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M tools/gn/parser.h View 1 2 chunks +11 lines, -1 line 0 comments Download
M tools/gn/parser.cc View 1 2 3 4 4 chunks +137 lines, -3 lines 0 comments Download
M tools/gn/parser_unittest.cc View 1 2 3 1 chunk +98 lines, -0 lines 0 comments Download
M tools/gn/scope_unittest.cc View 3 chunks +3 lines, -3 lines 0 comments Download
M tools/gn/string_utils.cc View 1 chunk +7 lines, -5 lines 0 comments Download
M tools/gn/token.h View 2 chunks +11 lines, -6 lines 0 comments Download
M tools/gn/tokenizer.h View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
M tools/gn/tokenizer.cc View 1 2 3 4 7 chunks +27 lines, -13 lines 0 comments Download
M tools/gn/tokenizer_unittest.cc View 2 chunks +24 lines, -4 lines 0 comments Download

Messages

Total messages: 28 (11 generated)
scottmg
First part of gn format.
6 years, 3 months ago (2014-09-22 22:12:22 UTC) #1
scottmg
first pass at suffix comments added.
6 years, 3 months ago (2014-09-23 00:11:03 UTC) #3
brettw
https://codereview.chromium.org/588893006/diff/60001/tools/gn/location.cc File tools/gn/location.cc (right): https://codereview.chromium.org/588893006/diff/60001/tools/gn/location.cc#newcode24 tools/gn/location.cc:24: byte_(byte) {} I liked the {} on separate lines. ...
6 years, 3 months ago (2014-09-23 21:33:15 UTC) #4
scottmg
Thanks https://codereview.chromium.org/588893006/diff/60001/tools/gn/location.cc File tools/gn/location.cc (right): https://codereview.chromium.org/588893006/diff/60001/tools/gn/location.cc#newcode24 tools/gn/location.cc:24: byte_(byte) {} On 2014/09/23 21:33:15, brettw wrote: > ...
6 years, 3 months ago (2014-09-23 22:15:37 UTC) #6
brettw
LGTM. If you didn't notice, command_args.cc has some comment finding code in it that should ...
6 years, 3 months ago (2014-09-23 22:32:41 UTC) #7
scottmg
On 2014/09/23 22:32:41, brettw wrote: > LGTM. If you didn't notice, command_args.cc has some comment ...
6 years, 3 months ago (2014-09-23 22:44:36 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/588893006/100001
6 years, 3 months ago (2014-09-23 22:45:14 UTC) #10
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_x64_rel_swarming on tryserver.chromium.win (http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_swarming/builds/12328)
6 years, 3 months ago (2014-09-23 23:44:57 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/588893006/120001
6 years, 3 months ago (2014-09-23 23:50:16 UTC) #14
commit-bot: I haz the power
Try jobs failed on following builders: ios_dbg_simulator on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator/builds/17801) ios_rel_device on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_rel_device/builds/17734) ios_rel_device_ninja ...
6 years, 3 months ago (2014-09-24 00:04:42 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/588893006/120001
6 years, 3 months ago (2014-09-24 00:07:54 UTC) #18
commit-bot: I haz the power
Try jobs failed on following builders: ios_dbg_simulator on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator/builds/17811)
6 years, 3 months ago (2014-09-24 00:12:45 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/588893006/120001
6 years, 3 months ago (2014-09-24 00:35:13 UTC) #22
commit-bot: I haz the power
Try jobs failed on following builders: ios_dbg_simulator on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator/builds/17849) ios_rel_device on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_rel_device/builds/17782) ios_rel_device_ninja ...
6 years, 3 months ago (2014-09-24 00:40:09 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/588893006/120001
6 years, 3 months ago (2014-09-24 02:18:28 UTC) #26
commit-bot: I haz the power
Committed patchset #5 (id:120001) as 5a1103979fdb1c690720cca88e0f855802421839
6 years, 3 months ago (2014-09-24 02:29:19 UTC) #27
commit-bot: I haz the power
6 years, 3 months ago (2014-09-24 02:29:55 UTC) #28
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/be5d45107aeffccffa607908399ca0ae20512589
Cr-Commit-Position: refs/heads/master@{#296331}

Powered by Google App Engine
This is Rietveld 408576698