mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: use Node.Int more
Generated by eg. Passes toolstash -cmp. Change-Id: I7516c211ca9aacf824f74894671dc62d31763b01 Reviewed-on: https://go-review.googlesource.com/21422 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
3a0783c504
commit
e504055e78
8 changed files with 46 additions and 46 deletions
|
|
@ -484,7 +484,7 @@ func aindex(b *Node, t *Type) *Type {
|
|||
|
||||
case CTINT, CTRUNE:
|
||||
hasbound = true
|
||||
bound = b.Val().U.(*Mpint).Int64()
|
||||
bound = b.Int()
|
||||
if bound < 0 {
|
||||
Yyerror("array bound must be non negative")
|
||||
}
|
||||
|
|
@ -2054,7 +2054,7 @@ func powtwo(n *Node) int {
|
|||
return -1
|
||||
}
|
||||
|
||||
v := uint64(n.Val().U.(*Mpint).Int64())
|
||||
v := uint64(n.Int())
|
||||
b := uint64(1)
|
||||
for i := 0; i < 64; i++ {
|
||||
if b == v {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue