Skip to content

Commit

Permalink
cmd/compile/internal/walk: remove un-used func/var
Browse files Browse the repository at this point in the history
Change-Id: I0ea1340cbca3dfb8b6bd71df439edd410e452fa3
Reviewed-on: https://go-review.googlesource.com/c/go/+/506478
Reviewed-by: Keith Randall <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
Reviewed-by: Matthew Dempsky <[email protected]>
Auto-Submit: Cuong Manh Le <[email protected]>
Run-TryBot: Cuong Manh Le <[email protected]>
Reviewed-by: Keith Randall <[email protected]>
  • Loading branch information
cuonglm authored and gopherbot committed Jul 21, 2023
1 parent 5c2b43a commit d161207
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 18 deletions.
15 changes: 0 additions & 15 deletions src/cmd/compile/internal/walk/range.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
3 changes: 0 additions & 3 deletions src/cmd/compile/internal/walk/walk.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
package walk

import (
"errors"
"fmt"

"cmd/compile/internal/base"
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit d161207

Please sign in to comment.