]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: replace magic numbers "2" and "1" with named constant
authorDavid Chase <drchase@google.com>
Tue, 7 Nov 2023 21:37:17 +0000 (16:37 -0500)
committerDavid Chase <drchase@google.com>
Wed, 15 Nov 2023 20:06:34 +0000 (20:06 +0000)
commit6f5aba995fdea76433337d1a8030518bdadfae28
treec55ec64ee6b24e95a21b9494d2c203d1b6cd92de
parentfdc21f3eafe94490e55e0bf018490b3aa9ba2383
cmd/compile: replace magic numbers "2" and "1" with named constant

This was originally done for a #next-encoding-based check for
misbehaving loops, but it's a good idea anyhow because it makes
the code slightly easier to follow or change (we may decide to
check for errors the "other way" anyhow, later).

Change-Id: I2ba8f6e0f9146f0ff148a900eabdefd0fffebf8b
Reviewed-on: https://go-review.googlesource.com/c/go/+/540261
Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
src/cmd/compile/internal/rangefunc/rewrite.go