mirror of
https://github.com/golang/go
synced 2024-11-18 18:54:42 -07:00
go.tools/go/ssa: add Max to Slice's SSA operand list
LGTM=adonovan R=adonovan, bradfitz CC=golang-codereviews https://golang.org/cl/101160043
This commit is contained in:
parent
cc02c5be36
commit
cd36f52558
7
go/ssa/interp/testdata/coverage.go
vendored
7
go/ssa/interp/testdata/coverage.go
vendored
@ -635,6 +635,13 @@ func init() {
|
||||
if got := lenCapLoHi(s[1:3:3]); got != [4]int{2, 2, 1, 2} {
|
||||
panic(got)
|
||||
}
|
||||
max := 3
|
||||
if v[2] == 42 {
|
||||
max = 2
|
||||
}
|
||||
if got := lenCapLoHi(s[1:2:max]); got != [4]int{1, 1, 1, 1} {
|
||||
panic(got)
|
||||
}
|
||||
}
|
||||
|
||||
// Regression test for issue 7840 (covered by SSA sanity checker).
|
||||
|
@ -1655,7 +1655,7 @@ func (s *Send) Operands(rands []*Value) []*Value {
|
||||
}
|
||||
|
||||
func (v *Slice) Operands(rands []*Value) []*Value {
|
||||
return append(rands, &v.X, &v.Low, &v.High)
|
||||
return append(rands, &v.X, &v.Low, &v.High, &v.Max)
|
||||
}
|
||||
|
||||
func (s *Store) Operands(rands []*Value) []*Value {
|
||||
|
Loading…
Reference in New Issue
Block a user