Skip to content

Commit 21acfdc

Browse files
committed
cmd/compile: turn off variable-sized make() stack allocation with -N
Give people a way to turn this optimization off. (Currently the constant-sized make() stack allocation is not disabled with -N. Kinda inconsistent, but oh well, probably worse to change it now.) Update #73253 Change-Id: Idb9ffde444f34e70673147fd6a962368904a7a55 Reviewed-on: https://go-review.googlesource.com/c/go/+/664655 Reviewed-by: Dmitri Shuralyov <[email protected]> Reviewed-by: Jorropo <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Keith Randall <[email protected]> Reviewed-by: t hepudds <[email protected]>
1 parent 03640f6 commit 21acfdc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ func walkMakeSlice(n *ir.MakeExpr, init *ir.Nodes) ir.Node {
568568
// The conv is necessary in case n.Type is named.
569569
return walkExpr(typecheck.Expr(typecheck.Conv(s, n.Type())), init)
570570
}
571-
tryStack = true
571+
tryStack = base.Flag.N == 0
572572
}
573573

574574
// The final result is assigned to this variable.

0 commit comments

Comments
 (0)