Skip to content

Commit b922055

Browse files
committed
cmd/compile/internal/walk: remove litas
Since when its only usage is in maplit, and its body is simple enough to be inlined directly at the caller side. Change-Id: Id6b8a9d230d0e1e7f8da8d33bbc0073d3e816fb5 Reviewed-on: https://go-review.googlesource.com/c/go/+/403998 Reviewed-by: Matthew Dempsky <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> Run-TryBot: Cuong Manh Le <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]>
1 parent aeb933d commit b922055

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/cmd/compile/internal/walk/complit.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,6 @@ func isSimpleName(nn ir.Node) bool {
7272
return n.OnStack()
7373
}
7474

75-
func litas(l ir.Node, r ir.Node, init *ir.Nodes) {
76-
appendWalkStmt(init, ir.NewAssignStmt(base.Pos, l, r))
77-
}
78-
7975
// initGenType is a bitmap indicating the types of generation that will occur for a static value.
8076
type initGenType uint8
8177

@@ -420,7 +416,7 @@ func maplit(n *ir.CompLitExpr, m ir.Node, init *ir.Nodes) {
420416
a := ir.NewCallExpr(base.Pos, ir.OMAKE, nil, nil)
421417
a.SetEsc(n.Esc())
422418
a.Args = []ir.Node{ir.TypeNode(n.Type()), ir.NewInt(n.Len + int64(len(n.List)))}
423-
litas(m, a, init)
419+
appendWalkStmt(init, ir.NewAssignStmt(base.Pos, m, a))
424420

425421
entries := n.List
426422

0 commit comments

Comments
 (0)