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

Issue 10894011: Do not emit some unnecessary whitespaces in unparser. (Closed)

Created:
8 years, 3 months ago by Roman
Modified:
8 years, 3 months ago
Reviewers:
Anton Muhin, ahe
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Do not emit some unnecessary whitespaces in unparser. This reduces the size of dart2js minified bundle by 12K (417 -> 405), 3% Committed: https://code.google.com/p/dart/source/detail?r=11611

Patch Set 1 #

Patch Set 2 : #

Total comments: 11

Patch Set 3 : #

Total comments: 10

Patch Set 4 : #

Patch Set 5 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+57 lines, -62 lines) Patch
M lib/compiler/implementation/scanner/listener.dart View 1 chunk +1 line, -1 line 0 comments Download
M lib/compiler/implementation/tree/unparser.dart View 1 2 3 4 13 chunks +20 lines, -25 lines 0 comments Download
M tests/compiler/dart2js/unparser_test.dart View 1 2 16 chunks +36 lines, -36 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
Roman
8 years, 3 months ago (2012-08-30 10:15:09 UTC) #1
Anton Muhin
https://chromiumcodereview.appspot.com/10894011/diff/2001/lib/compiler/implementation/tree/unparser.dart File lib/compiler/implementation/tree/unparser.dart (left): https://chromiumcodereview.appspot.com/10894011/diff/2001/lib/compiler/implementation/tree/unparser.dart#oldcode224 lib/compiler/implementation/tree/unparser.dart:224: String delimiter = (node.delimiter === null) ? " " ...
8 years, 3 months ago (2012-08-30 10:24:16 UTC) #2
Roman
https://chromiumcodereview.appspot.com/10894011/diff/2001/lib/compiler/implementation/tree/unparser.dart File lib/compiler/implementation/tree/unparser.dart (left): https://chromiumcodereview.appspot.com/10894011/diff/2001/lib/compiler/implementation/tree/unparser.dart#oldcode224 lib/compiler/implementation/tree/unparser.dart:224: String delimiter = (node.delimiter === null) ? " " ...
8 years, 3 months ago (2012-08-30 10:40:51 UTC) #3
ahe
LGTM. Overall, this feels like it is cleaner than before, but it also feels like ...
8 years, 3 months ago (2012-08-30 10:42:45 UTC) #4
Roman
There are still cases when unnecessary whitespaces are added, but I just don't want to ...
8 years, 3 months ago (2012-08-30 11:38:48 UTC) #5
ahe
https://chromiumcodereview.appspot.com/10894011/diff/4001/lib/compiler/implementation/tree/unparser.dart File lib/compiler/implementation/tree/unparser.dart (right): https://chromiumcodereview.appspot.com/10894011/diff/4001/lib/compiler/implementation/tree/unparser.dart#newcode247 lib/compiler/implementation/tree/unparser.dart:247: if (node.hasExpression && node.getBeginToken().slowToString() != '=>') { On 2012/08/30 ...
8 years, 3 months ago (2012-08-30 11:51:07 UTC) #6
Roman
https://chromiumcodereview.appspot.com/10894011/diff/4001/lib/compiler/implementation/tree/unparser.dart File lib/compiler/implementation/tree/unparser.dart (right): https://chromiumcodereview.appspot.com/10894011/diff/4001/lib/compiler/implementation/tree/unparser.dart#newcode247 lib/compiler/implementation/tree/unparser.dart:247: if (node.hasExpression && node.getBeginToken().slowToString() != '=>') { On 2012/08/30 ...
8 years, 3 months ago (2012-08-30 11:54:55 UTC) #7
Roman
And about long lines in unparser_test - these strings change pretty often and nobody really ...
8 years, 3 months ago (2012-08-30 11:57:38 UTC) #8
Anton Muhin
https://chromiumcodereview.appspot.com/10894011/diff/2001/lib/compiler/implementation/tree/unparser.dart File lib/compiler/implementation/tree/unparser.dart (left): https://chromiumcodereview.appspot.com/10894011/diff/2001/lib/compiler/implementation/tree/unparser.dart#oldcode224 lib/compiler/implementation/tree/unparser.dart:224: String delimiter = (node.delimiter === null) ? " " ...
8 years, 3 months ago (2012-08-30 12:01:53 UTC) #9
Roman
https://chromiumcodereview.appspot.com/10894011/diff/2001/lib/compiler/implementation/tree/unparser.dart File lib/compiler/implementation/tree/unparser.dart (right): https://chromiumcodereview.appspot.com/10894011/diff/2001/lib/compiler/implementation/tree/unparser.dart#newcode344 lib/compiler/implementation/tree/unparser.dart:344: if (node.body is !Block) sb.add(' '); On 2012/08/30 12:01:53, ...
8 years, 3 months ago (2012-08-30 12:16:04 UTC) #10
Anton Muhin
https://chromiumcodereview.appspot.com/10894011/diff/2001/lib/compiler/implementation/tree/unparser.dart File lib/compiler/implementation/tree/unparser.dart (right): https://chromiumcodereview.appspot.com/10894011/diff/2001/lib/compiler/implementation/tree/unparser.dart#newcode344 lib/compiler/implementation/tree/unparser.dart:344: if (node.body is !Block) sb.add(' '); Up to you ...
8 years, 3 months ago (2012-08-30 12:22:00 UTC) #11
ahe
8 years, 3 months ago (2012-08-30 14:23:36 UTC) #12
On 2012/08/30 11:57:38, Roman wrote:
> And about long lines in unparser_test - these strings change pretty often and
> nobody really reads them, it just takes much time to edit them to fit 80 chars
> without any real reward. If something goes wrong there I usually re-run the
test
> with additional line breaks so I can actually read the output.

Hi Roman,

If have have to limit all the lines I write to 80 columns (which I think is
ridiculous), then so do you :-)

Cheers,
Peter

Powered by Google App Engine
This is Rietveld 408576698