cmd/compile: delete unused (*Node) SetInt, SetBigInt, Bool

Introduced in CL 9263 (prepare to unexport gc.Mp*) and CL 9267
(prepare Node.Val to be unexported), their only callers were in
the old backend and all got deleted in CL 29168 (cmd/compile:
delete lots of the legacy backend).

Update #16357

Change-Id: I0a5d76b98b418e8ec0984c033c3bc0ac3fc5f38a
Reviewed-on: https://go-review.googlesource.com/29997
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Alberto Donizetti 2016-09-29 19:49:36 +02:00 committed by Brad Fitzpatrick
parent 6fea452e38
commit 2b49d129c4

View file

@ -5,7 +5,6 @@
package gc
import (
"cmd/compile/internal/big"
"cmd/internal/obj"
"strings"
)
@ -121,33 +120,6 @@ func (n *Node) Int64() int64 {
return n.Val().U.(*Mpint).Int64()
}
// SetInt sets n's value to i.
// n must be an integer constant.
func (n *Node) SetInt(i int64) {
if !Isconst(n, CTINT) {
Fatalf("SetInt(%v)", n)
}
n.Val().U.(*Mpint).SetInt64(i)
}
// SetBigInt sets n's value to x.
// n must be an integer constant.
func (n *Node) SetBigInt(x *big.Int) {
if !Isconst(n, CTINT) {
Fatalf("SetBigInt(%v)", n)
}
n.Val().U.(*Mpint).Val.Set(x)
}
// Bool returns n as an bool.
// n must be an boolean constant.
func (n *Node) Bool() bool {
if !Isconst(n, CTBOOL) {
Fatalf("Int(%v)", n)
}
return n.Val().U.(bool)
}
// truncate float literal fv to 32-bit or 64-bit precision
// according to type; return truncated value.
func truncfltlit(oldv *Mpflt, t *Type) *Mpflt {