]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: delete unused (*Node) SetInt, SetBigInt, Bool
authorAlberto Donizetti <alb.donizetti@gmail.com>
Thu, 29 Sep 2016 17:49:36 +0000 (19:49 +0200)
committerBrad Fitzpatrick <bradfitz@golang.org>
Thu, 29 Sep 2016 18:52:14 +0000 (18:52 +0000)
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>
src/cmd/compile/internal/gc/const.go

index 756286b3fae7ffb7455b0832ca64a3c5a3d1e999..cc8eadcd241be8573fd52e16a43707cbb5a9906b 100644 (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 {