aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/stack_test.go
diff options
context:
space:
mode:
authorGiovanni Bajo <rasky@develer.com>2018-04-03 18:58:01 +0200
committerGiovanni Bajo <rasky@develer.com>2018-04-03 20:25:34 +0000
commitac43de3ae5027f61e6b028c806f6b83f80ee5d3b (patch)
treec3d475d6f15a36e856a2d7353bcbec0282be5e1b /src/runtime/stack_test.go
parentb846edfd5979d1cf53d55ea8fd6e4bbcfefb2e75 (diff)
downloadgo-ac43de3ae5027f61e6b028c806f6b83f80ee5d3b.tar.xz
cmd/compile: in prove, complete support for OpIsInBounds/OpIsSliceInBounds
The logic in addBranchRestrictions didn't allow to correctly model OpIs(Slice)Bound for signed domain, and it was also partly implemented within addRestrictions. Thanks to the previous changes, it is now possible to handle the negative conditions correctly, so that we can learn both signed/LT + unsigned/LT on the positive side, and signed/GE + unsigned/GE on the negative side (but only if the index can be proved to be non-negative). This is able to prove ~50 more slice accesses in std+cmd. Change-Id: I9858080dc03b16f85993a55983dbc4b00f8491b0 Reviewed-on: https://go-review.googlesource.com/104037 Run-TryBot: Giovanni Bajo <rasky@develer.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Austin Clements <austin@google.com>
Diffstat (limited to 'src/runtime/stack_test.go')
0 files changed, 0 insertions, 0 deletions