diff options
| author | Alberto Donizetti <alb.donizetti@gmail.com> | 2016-09-29 19:49:36 +0200 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@golang.org> | 2016-09-29 18:52:14 +0000 |
| commit | 2b49d129c48b0036ee595fbf7b91a0e9292f87ee (patch) | |
| tree | 004a070d9aba808341ae15c26e11efdeef27dd98 | |
| parent | 6fea452e38012e167e8a8f08f571e0240b248c97 (diff) | |
| download | go-2b49d129c48b0036ee595fbf7b91a0e9292f87ee.tar.xz | |
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>
| -rw-r--r-- | src/cmd/compile/internal/gc/const.go | 28 |
1 files changed, 0 insertions, 28 deletions
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 { |
