mirror of
https://github.com/golang/go
synced 2024-11-26 14:46:47 -07:00
cmd/compile/internal/walk: remove un-used func/var
Change-Id: I0ea1340cbca3dfb8b6bd71df439edd410e452fa3 Reviewed-on: https://go-review.googlesource.com/c/go/+/506478 Reviewed-by: Keith Randall <khr@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com> Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com> Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com> Reviewed-by: Keith Randall <khr@google.com>
This commit is contained in:
parent
5c2b43a761
commit
d1612071d9
@ -564,18 +564,3 @@ func arrayClear(wbPos src.XPos, a ir.Node, nrange *ir.RangeStmt) ir.Node {
|
||||
typecheck.Stmts(n.Body)
|
||||
return walkStmt(n)
|
||||
}
|
||||
|
||||
// addptr returns (*T)(uintptr(p) + n).
|
||||
func addptr(p ir.Node, n int64) ir.Node {
|
||||
t := p.Type()
|
||||
|
||||
p = ir.NewConvExpr(base.Pos, ir.OCONVNOP, nil, p)
|
||||
p.SetType(types.Types[types.TUINTPTR])
|
||||
|
||||
p = ir.NewBinaryExpr(base.Pos, ir.OADD, p, ir.NewInt(base.Pos, n))
|
||||
|
||||
p = ir.NewConvExpr(base.Pos, ir.OCONVNOP, nil, p)
|
||||
p.SetType(t)
|
||||
|
||||
return p
|
||||
}
|
||||
|
@ -5,7 +5,6 @@
|
||||
package walk
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"cmd/compile/internal/base"
|
||||
@ -98,8 +97,6 @@ func convas(n *ir.AssignStmt, init *ir.Nodes) *ir.AssignStmt {
|
||||
return n
|
||||
}
|
||||
|
||||
var stop = errors.New("stop")
|
||||
|
||||
func vmkcall(fn ir.Node, t *types.Type, init *ir.Nodes, va []ir.Node) *ir.CallExpr {
|
||||
if init == nil {
|
||||
base.Fatalf("mkcall with nil init: %v", fn)
|
||||
|
Loading…
Reference in New Issue
Block a user