]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: clarify unsigned interpretation of AuxInt
authorAustin Clements <austin@google.com>
Sun, 25 Mar 2018 16:20:57 +0000 (12:20 -0400)
committerAustin Clements <austin@google.com>
Mon, 26 Mar 2018 19:08:24 +0000 (19:08 +0000)
commit2d8181e7b5ffe685847a6bb922170c4bbe1c97f6
treecdb067e22d78824d5dc2d5b2616f210865ab5c08
parenta29e25b82c9d39c448df6dfcea01bfeb111da1bc
cmd/compile: clarify unsigned interpretation of AuxInt

The way Value.AuxInt represents unsigned numbers is currently
documented in genericOps.go, which is not the most obvious place for
it. Move that documentation to Value.AuxInt. Furthermore, to make it
harder to use incorrectly, introduce a Value.AuxUnsigned accessor that
returns the zero-extended value of Value.AuxInt.

Change-Id: I85030c3c68761404058a430e0b1c7464591b2f42
Reviewed-on: https://go-review.googlesource.com/102597
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
src/cmd/compile/internal/ssa/gen/genericOps.go
src/cmd/compile/internal/ssa/prove.go
src/cmd/compile/internal/ssa/value.go