This worsens debugging, but improves performance.
Change-Id: I7f3c0d174823b3de412478f9537adc61ae4c076e
Reviewed-on: https://go-review.googlesource.com/c/go/+/620219
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
// Populate closure variables.
if fn.Needctxt() {
clo := s.entryNewValue0(ssa.OpGetClosurePtr, s.f.Config.Types.BytePtr)
- if fn.RangeParent != nil {
+ if fn.RangeParent != nil && base.Flag.N != 0 {
// For a range body closure, keep its closure pointer live on the
// stack with a special name, so the debugger can look for it and
// find the parent frame.