Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(12719)

Issue 6855061: code review 6855061: cmd/gc: Make sure bools lose idealness when used with l... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 5 months ago by DMorsing
Modified:
11 years, 4 months ago
Reviewers:
CC:
golang-dev, remyoudompheng, r, rsc, mtj1
Visibility:
Public.

Description

cmd/gc: Make sure bools lose idealness when used with logical operators. Bools from comparisons can be assigned to all bool types, but this idealness would propagate through logical operators when the result should have been lowered to a non-ideal form. Fixes issue 3924.

Patch Set 1 #

Patch Set 2 : diff -r bbc0024af4a4 https://code.google.com/p/go/ #

Patch Set 3 : diff -r bbc0024af4a4 https://code.google.com/p/go/ #

Patch Set 4 : diff -r 3fc28eec1b38 https://code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+17 lines, -1 line) Patch
M src/cmd/gc/typecheck.c View 1 1 chunk +4 lines, -1 line 0 comments Download
A test/fixedbugs/issue3924.go View 1 1 chunk +13 lines, -0 lines 0 comments Download

Messages

Total messages: 15
DMorsing
Hello golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go/
11 years, 5 months ago (2012-11-18 18:16:46 UTC) #1
remyoudompheng
I don't understand why the comparison result should be lowered to a concrete type before ...
11 years, 5 months ago (2012-11-18 23:04:27 UTC) #2
DMorsing
On 2012/11/18 23:04:27, remyoudompheng wrote: > I don't understand why the comparison result should be ...
11 years, 5 months ago (2012-11-18 23:23:10 UTC) #3
r
Here's the relevant sentence from the spec: Logical operators apply to boolean values and yield ...
11 years, 5 months ago (2012-11-18 23:35:23 UTC) #4
remyoudompheng
On 2012/11/19 Rob Pike <r@golang.org> wrote: > Here's the relevant sentence from the spec: > ...
11 years, 5 months ago (2012-11-19 01:19:12 UTC) #5
rsc
I am quite confused about whether this is the behavior we want. The distinction about ...
11 years, 5 months ago (2012-11-19 13:31:08 UTC) #6
mtj1
...and maybe add the missing boolean operations & and | friends? On Mon, Nov 19, ...
11 years, 5 months ago (2012-11-19 14:01:39 UTC) #7
DMorsing
On Mon, Nov 19, 2012 at 2:31 PM, Russ Cox <rsc@golang.org> wrote: > I am ...
11 years, 4 months ago (2012-11-20 16:09:01 UTC) #8
remyoudompheng
On 2012/11/20 16:09:01, DMorsing wrote: > On Mon, Nov 19, 2012 at 2:31 PM, Russ ...
11 years, 4 months ago (2012-11-20 17:30:45 UTC) #9
DMorsing
On 2012/11/20 17:30:45, remyoudompheng wrote: > On 2012/11/20 16:09:01, DMorsing wrote: > > On Mon, ...
11 years, 4 months ago (2012-11-20 17:58:06 UTC) #10
rsc
LGTM I think the spec might be helped by some tweaks, but this matches the ...
11 years, 4 months ago (2012-11-26 19:01:04 UTC) #11
DMorsing
On Mon, Nov 26, 2012 at 8:01 PM, Russ Cox <rsc@golang.org> wrote: > LGTM > ...
11 years, 4 months ago (2012-11-26 21:16:04 UTC) #12
rsc
I thought this CL was making gc consistent with gccgo? What's inconsistent still?
11 years, 4 months ago (2012-11-26 21:16:40 UTC) #13
DMorsing
On Mon, Nov 26, 2012 at 10:16 PM, Russ Cox <rsc@golang.org> wrote: > I thought ...
11 years, 4 months ago (2012-11-26 21:21:08 UTC) #14
DMorsing
11 years, 4 months ago (2012-11-26 21:23:18 UTC) #15
*** Submitted as http://code.google.com/p/go/source/detail?r=81b14ef2226a ***

cmd/gc: Make sure bools lose idealness when used with logical operators.

Bools from comparisons can be assigned to all bool types, but this idealness
would propagate through logical operators when the result should have been
lowered to a non-ideal form.

Fixes issue 3924.

R=golang-dev, remyoudompheng, r, rsc, mtj
CC=golang-dev
http://codereview.appspot.com/6855061
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b