mirror of
https://github.com/golang/go.git
synced 2025-05-05 15:43:04 +00:00
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 <dmitshur@google.com> Reviewed-by: Jorropo <jorropo.pgm@gmail.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: t hepudds <thepudds1460@gmail.com>
This commit is contained in:
parent
03640f688b
commit
21acfdc4ef
@ -568,7 +568,7 @@ func walkMakeSlice(n *ir.MakeExpr, init *ir.Nodes) ir.Node {
|
|||||||
// The conv is necessary in case n.Type is named.
|
// The conv is necessary in case n.Type is named.
|
||||||
return walkExpr(typecheck.Expr(typecheck.Conv(s, n.Type())), init)
|
return walkExpr(typecheck.Expr(typecheck.Conv(s, n.Type())), init)
|
||||||
}
|
}
|
||||||
tryStack = true
|
tryStack = base.Flag.N == 0
|
||||||
}
|
}
|
||||||
|
|
||||||
// The final result is assigned to this variable.
|
// The final result is assigned to this variable.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user