Commit 2b49d129 authored by Alberto Donizetti's avatar Alberto Donizetti Committed by Brad Fitzpatrick

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/29997Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 6fea452e
......@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment