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
|
|
@ -1455,7 +1455,7 @@ func nonnegconst(n *Node) int {
|
|||
if n.Val().U.(*Mpint).Cmp(Minintval[TUINT32]) < 0 || n.Val().U.(*Mpint).Cmp(Maxintval[TINT32]) > 0 {
|
||||
break
|
||||
}
|
||||
return int(n.Val().U.(*Mpint).Int64())
|
||||
return int(n.Int())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1510,7 +1510,7 @@ func (n *Node) Convconst(con *Node, t *Type) {
|
|||
Fatalf("convconst ctype=%d %v", n.Val().Ctype(), Tconv(t, FmtLong))
|
||||
|
||||
case CTINT, CTRUNE:
|
||||
i = n.Val().U.(*Mpint).Int64()
|
||||
i = n.Int()
|
||||
|
||||
case CTBOOL:
|
||||
i = int64(obj.Bool2int(n.Val().U.(bool)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue