From: Alberto Donizetti Date: Thu, 29 Sep 2016 17:49:36 +0000 (+0200) Subject: cmd/compile: delete unused (*Node) SetInt, SetBigInt, Bool X-Git-Tag: go1.8beta1~1111 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=2b49d129c48b0036ee595fbf7b91a0e9292f87ee;p=gostls13.git 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 --- diff --git a/src/cmd/compile/internal/gc/const.go b/src/cmd/compile/internal/gc/const.go index 756286b3fa..cc8eadcd24 100644 --- a/src/cmd/compile/internal/gc/const.go +++ b/src/cmd/compile/internal/gc/const.go @@ -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 {