]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: minor cleanup
authorJosh Bleecher Snyder <josharian@gmail.com>
Wed, 26 Apr 2017 17:18:41 +0000 (10:18 -0700)
committerJosh Bleecher Snyder <josharian@gmail.com>
Wed, 26 Apr 2017 18:01:14 +0000 (18:01 +0000)
commite1a7db7f3b9c2d684c0ac4b0cc2c845f8b70fd85
treed3222293d18804f4747c2e9dbee6b432699f7788
parent6910e1085b191d6b202a93fafb019ff95dcc6f11
cmd/compile: minor cleanup

Follow-up to review comments on CL 41797.

Mask the input to set2 and set3, so that at the very least,
we won't corrupt the rest of the flags in case of a bad input.
It also seems more semantically appropriate.

Do minor cleanup in addrescapes. I started on larger cleanup,
but it wasn't clear that it was an improvement.

Add warning comments and sanity checks to Initorder and Class constants,
to attempt to prevent them from overflowing their allotted flag bits.

Passes toolstash-check.

Change-Id: I57b9661ba36f56406aa7a1d8da9b7c70338f9119
Reviewed-on: https://go-review.googlesource.com/41817
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/cmd/compile/internal/gc/bitset.go
src/cmd/compile/internal/gc/gen.go
src/cmd/compile/internal/gc/go.go
src/cmd/compile/internal/gc/sinit.go