aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/rangefunc
diff options
context:
space:
mode:
authorDavid Chase <drchase@google.com>2024-05-22 16:15:43 -0400
committerGopher Robot <gobot@golang.org>2024-05-23 01:05:44 +0000
commit50c298a5a3b0d8534a724960f949ac3c56ff64bd (patch)
treeca325043239190dc79d438ac762b598aa5b43bc8 /src/cmd/compile/internal/rangefunc
parent997b6969fd7be64a03255ef998981de716aa4313 (diff)
downloadgo-50c298a5a3b0d8534a724960f949ac3c56ff64bd.tar.xz
cmd/compile: repairing variable names and comments
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>
Diffstat (limited to 'src/cmd/compile/internal/rangefunc')
-rw-r--r--src/cmd/compile/internal/rangefunc/rewrite.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/rangefunc/rewrite.go b/src/cmd/compile/internal/rangefunc/rewrite.go
index 8d09782a9e..2dcdc3f018 100644
--- a/src/cmd/compile/internal/rangefunc/rewrite.go
+++ b/src/cmd/compile/internal/rangefunc/rewrite.go
@@ -160,7 +160,7 @@ The value of #stateK transitions
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]
@@ -447,6 +447,8 @@ becomes
#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