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

Issue 2042883004: Handle more boolean conversion cases. (Closed)

Created:
4 years, 6 months ago by sra1
Modified:
4 years, 6 months ago
Reviewers:
Jennifer Messerly
CC:
dev-compiler+reviews_dartlang.org
Base URL:
https://github.com/dart-lang/dev_compiler@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Handle more boolean conversion cases. We were missing boolean conversion checks on logical operators in a value context. TBR=jmesserly@google.com Committed: https://github.com/dart-lang/dev_compiler/commit/e11426765e2c06ca320efb1dbcbea00909c6d655

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+143 lines, -130 lines) Patch
M lib/runtime/dart_sdk.js View 110 chunks +130 lines, -130 lines 0 comments Download
M lib/src/compiler/code_generator.dart View 2 chunks +13 lines, -0 lines 1 comment Download

Messages

Total messages: 3 (1 generated)
sra1
Committed patchset #1 (id:1) manually as e11426765e2c06ca320efb1dbcbea00909c6d655 (presubmit successful).
4 years, 6 months ago (2016-06-07 02:52:09 UTC) #2
Jennifer Messerly
4 years, 6 months ago (2016-06-07 19:28:35 UTC) #3
Message was sent while issue was closed.
lgtm

https://codereview.chromium.org/2042883004/diff/1/lib/src/compiler/code_gener...
File lib/src/compiler/code_generator.dart (right):

https://codereview.chromium.org/2042883004/diff/1/lib/src/compiler/code_gener...
lib/src/compiler/code_generator.dart:3476: return _visitTest(node);
Reading this, I was confused ... my thought was "shouldn't the check be on the
operands, not the result?"

I see that _visitTest is implemented to "push down" the check, so it works. Not
sure if it's worth a comment.

It does seem pretty cool that _visitTest is the place with the knowledge of all
boolean operations. I wonder if _emitBooleanOperation or something like that
might describe its role (just brainstorming ... not sure the right name).

Powered by Google App Engine
This is Rietveld 408576698