aboutsummaryrefslogtreecommitdiff
path: root/src/database/sql
diff options
context:
space:
mode:
authorJonah Uellenberg <JonahUellenberg@gmail.com>2026-02-06 02:48:07 +0000
committerGopher Robot <gobot@golang.org>2026-02-06 09:40:28 -0800
commitbd7b8a52c847afcfc15b21741ec8972275a79c34 (patch)
tree53de07a77f8c0593f9213b238febe3e38a582f5f /src/database/sql
parent5f51b092846ae43d03092d866449d9933a8bf42b (diff)
downloadgo-bd7b8a52c847afcfc15b21741ec8972275a79c34.tar.xz
runtime: add explicit lower bounds check to decoderune
decoderune is only called by generated code, so we can guarantee that it's non-negative. This allows eliminating the automatic bounds check in it. To make this work, we need to expand the existing optimization to uints. This generally enables BCE for cases like this: ```go func test(list []int, idx uint64) int { if idx >= uint64(len(list)) { return 0 } list1 := list[idx:] return list1[0] } ``` Change-Id: I86a51b26ca0e63522dec99f7d6efe6bdcd2d6487 GitHub-Last-Rev: 82d44e0a080b53ee02c31ee1f92a8a0acd8d2621 GitHub-Pull-Request: golang/go#76610 Reviewed-on: https://go-review.googlesource.com/c/go/+/725101 Reviewed-by: Keith Randall <khr@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Knyszek <mknyszek@google.com> Auto-Submit: Keith Randall <khr@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
Diffstat (limited to 'src/database/sql')
0 files changed, 0 insertions, 0 deletions