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

Issue 1588813002: dart2js cps: Avoid comparing boolean values to boolean constants. (Closed)

Created:
4 years, 11 months ago by asgerf
Modified:
4 years, 11 months ago
CC:
reviews_dartlang.org
Base URL:
git@github.com:dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

dart2js cps: Avoid comparing boolean values to boolean constants. E.g. (x === true) can be replaced with x if x is a boolean. Box2D has some code where this happens. BUG= R=kmillikin@google.com, sra@google.com Committed: https://github.com/dart-lang/sdk/commit/dd8ba75909d2ba36d8cb79b217e00604c942ba02 Committed: https://github.com/dart-lang/sdk/commit/1b9a7e0be56853c2c59e452f9255669c055f9ac0

Patch Set 1 #

Patch Set 2 : Remove unnecessary strictness check #

Total comments: 2

Patch Set 3 : Force reprocessing after replacing identical with equality #

Patch Set 4 : Update expected output #

Unified diffs Side-by-side diffs Delta from patch set Stats (+58 lines, -20 lines) Patch
M pkg/compiler/lib/src/cps_ir/type_propagation.dart View 1 2 3 3 chunks +56 lines, -18 lines 0 comments Download
M tests/compiler/dart2js/cps_ir/expected/basic_10.js View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M tests/compiler/dart2js/cps_ir/expected/operators_4.js View 1 2 3 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 11 (3 generated)
asgerf
4 years, 11 months ago (2016-01-14 01:21:53 UTC) #2
Kevin Millikin (Google)
LGTM. https://codereview.chromium.org/1588813002/diff/20001/pkg/compiler/lib/src/cps_ir/type_propagation.dart File pkg/compiler/lib/src/cps_ir/type_propagation.dart (right): https://codereview.chromium.org/1588813002/diff/20001/pkg/compiler/lib/src/cps_ir/type_propagation.dart#newcode2130 pkg/compiler/lib/src/cps_ir/type_propagation.dart:2130: default: This is disconcerting.
4 years, 11 months ago (2016-01-14 01:26:45 UTC) #3
asgerf
https://codereview.chromium.org/1588813002/diff/20001/pkg/compiler/lib/src/cps_ir/type_propagation.dart File pkg/compiler/lib/src/cps_ir/type_propagation.dart (right): https://codereview.chromium.org/1588813002/diff/20001/pkg/compiler/lib/src/cps_ir/type_propagation.dart#newcode2130 pkg/compiler/lib/src/cps_ir/type_propagation.dart:2130: default: On 2016/01/14 01:26:45, Kevin Millikin (Google) wrote: > ...
4 years, 11 months ago (2016-01-14 01:43:15 UTC) #4
Kevin Millikin (Google)
On 2016/01/14 01:43:15, asgerf wrote: > https://codereview.chromium.org/1588813002/diff/20001/pkg/compiler/lib/src/cps_ir/type_propagation.dart > File pkg/compiler/lib/src/cps_ir/type_propagation.dart (right): > > https://codereview.chromium.org/1588813002/diff/20001/pkg/compiler/lib/src/cps_ir/type_propagation.dart#newcode2130 > ...
4 years, 11 months ago (2016-01-14 01:57:40 UTC) #5
asgerf
PTAL. There was a potential issue with the way == calls get rewritten to identical ...
4 years, 11 months ago (2016-01-14 18:47:42 UTC) #6
sra1
lgtm
4 years, 11 months ago (2016-01-14 19:07:18 UTC) #7
asgerf
Committed patchset #3 (id:40001) manually as dd8ba75909d2ba36d8cb79b217e00604c942ba02 (presubmit successful).
4 years, 11 months ago (2016-01-14 20:28:19 UTC) #9
asgerf
4 years, 11 months ago (2016-01-14 21:01:34 UTC) #11
Message was sent while issue was closed.
Committed patchset #4 (id:60001) manually as
1b9a7e0be56853c2c59e452f9255669c055f9ac0 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698