Change-Id: I2e775e92dcebf068426b3e2acbe088679c318ec4
Reviewed-on: https://go-review.googlesource.com/c/go/+/587578
Reviewed-by: Keith Randall <khr@golang.org>
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
}
pkg := types.LocalPkg
outer := "glob."
- var prefix string = "."
+ var suffix string = "."
switch why {
default:
base.FatalfAt(pos, "closureName: bad Op: %v", why)
case OCLOSURE:
if outerfn == nil || outerfn.OClosure == nil {
- prefix = ".func"
+ suffix = ".func"
}
case ORANGE:
- prefix = "-range"
+ suffix = "-range"
case OGO:
- prefix = ".gowrap"
+ suffix = ".gowrap"
case ODEFER:
- prefix = ".deferwrap"
+ suffix = ".deferwrap"
}
gen := &globClosgen
}
*gen++
- return pkg.Lookup(fmt.Sprintf("%s%s%d", outer, prefix, *gen))
+ return pkg.Lookup(fmt.Sprintf("%s%s%d", outer, suffix, *gen))
}
// NewClosureFunc creates a new Func to represent a function literal
if #stateN != abi.RF_READY { runtime.panicrangestate(#stateN) }
#stateN = abi.RF_PANIC
-(4) when loop iteration continues, and
+(4) when loop iteration continues,
#stateN = abi.RF_READY
[return true]
#state3 = abi.RF_READY
return true
})
+ if #state3 == abi.RF_PANIC {runtime.panicrangestate(abi.RF_MISSING_PANIC)}
+ #state3 = abi.RF_EXHAUSTED
if #next < 0 {
#state2 = abi.RF_DONE
return false