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

Issue 949753004: Avoid printing braces for one-statement blocks in js-printer. (Closed)

Created:
5 years, 10 months ago by sigurdm
Modified:
5 years, 10 months ago
Reviewers:
floitsch
CC:
reviews_dartlang.org, sra1
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Patch Set 1 : #

Total comments: 4

Patch Set 2 : Fix dangling else problem #

Total comments: 2

Patch Set 3 : Rename function #

Patch Set 4 : Add workaround to IE issue #

Patch Set 5 : Fix whitespace #

Total comments: 2

Patch Set 6 : label: break label; => ; and update unittest #

Unified diffs Side-by-side diffs Delta from patch set Stats (+106 lines, -28 lines) Patch
M pkg/js_ast/lib/src/nodes.dart View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M pkg/js_ast/lib/src/printer.dart View 1 2 3 4 5 10 chunks +39 lines, -14 lines 0 comments Download
M tests/compiler/dart2js/async_await_js_transform_test.dart View 1 2 3 4 5 5 chunks +7 lines, -8 lines 0 comments Download
M tests/compiler/dart2js/js_parser_statements_test.dart View 1 2 3 4 5 4 chunks +58 lines, -4 lines 0 comments Download

Messages

Total messages: 13 (3 generated)
sigurdm
5 years, 10 months ago (2015-02-23 08:47:02 UTC) #3
floitsch
I think this broke the dangling-else. Not sure what the best fix for the dangling-else ...
5 years, 10 months ago (2015-02-23 13:46:08 UTC) #4
sigurdm
PTAL https://codereview.chromium.org/949753004/diff/20001/pkg/compiler/lib/src/js/printer.dart File pkg/compiler/lib/src/js/printer.dart (right): https://codereview.chromium.org/949753004/diff/20001/pkg/compiler/lib/src/js/printer.dart#newcode278 pkg/compiler/lib/src/js/printer.dart:278: bool needsBracesInThen = hasElse On 2015/02/23 13:46:08, floitsch ...
5 years, 10 months ago (2015-02-23 14:13:22 UTC) #5
floitsch
LGTM. https://codereview.chromium.org/949753004/diff/40001/pkg/compiler/lib/src/js/printer.dart File pkg/compiler/lib/src/js/printer.dart (right): https://codereview.chromium.org/949753004/diff/40001/pkg/compiler/lib/src/js/printer.dart#newcode207 pkg/compiler/lib/src/js/printer.dart:207: Statement unwrapIfSingleStatement(Statement body) { unwrapBlockIfSingleStatement ?
5 years, 10 months ago (2015-02-23 14:26:05 UTC) #6
sigurdm
https://codereview.chromium.org/949753004/diff/40001/pkg/compiler/lib/src/js/printer.dart File pkg/compiler/lib/src/js/printer.dart (right): https://codereview.chromium.org/949753004/diff/40001/pkg/compiler/lib/src/js/printer.dart#newcode207 pkg/compiler/lib/src/js/printer.dart:207: Statement unwrapIfSingleStatement(Statement body) { On 2015/02/23 14:26:05, floitsch wrote: ...
5 years, 10 months ago (2015-02-23 14:34:21 UTC) #8
sigurdm
Committed patchset #3 (id:60001) manually as 43956 (presubmit successful).
5 years, 10 months ago (2015-02-23 14:51:08 UTC) #9
sigurdm
PTAL
5 years, 10 months ago (2015-02-24 11:42:59 UTC) #10
floitsch
LGTM. https://codereview.chromium.org/949753004/diff/100001/pkg/compiler/lib/src/js/printer.dart File pkg/compiler/lib/src/js/printer.dart (right): https://codereview.chromium.org/949753004/diff/100001/pkg/compiler/lib/src/js/printer.dart#newcode510 pkg/compiler/lib/src/js/printer.dart:510: Statement safeBody = (body is Break && body.targetLabel ...
5 years, 10 months ago (2015-02-24 20:02:10 UTC) #11
sigurdm
https://codereview.chromium.org/949753004/diff/100001/pkg/compiler/lib/src/js/printer.dart File pkg/compiler/lib/src/js/printer.dart (right): https://codereview.chromium.org/949753004/diff/100001/pkg/compiler/lib/src/js/printer.dart#newcode510 pkg/compiler/lib/src/js/printer.dart:510: Statement safeBody = (body is Break && body.targetLabel == ...
5 years, 10 months ago (2015-02-25 08:38:03 UTC) #12
sigurdm
5 years, 10 months ago (2015-02-25 08:38:23 UTC) #13
Message was sent while issue was closed.
Committed patchset #6 (id:120001) manually as 44016 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698