mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: zero all three argstorage slots
These changes were missed when going from 2 to 3 argstorage slots. https://go-review.googlesource.com/20296/ Change-Id: I930a307bb0b695bf1ae088030c9bbb6d14ca31d2 Reviewed-on: https://go-review.googlesource.com/21841 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
This commit is contained in:
parent
7f53391f6b
commit
7e40627a0e
2 changed files with 9 additions and 2 deletions
|
|
@ -284,7 +284,10 @@ func (b *Block) NewValue2I(line int32, op Op, t Type, auxint int64, arg0, arg1 *
|
|||
func (b *Block) NewValue3(line int32, op Op, t Type, arg0, arg1, arg2 *Value) *Value {
|
||||
v := b.Func.newValue(op, t, b, line)
|
||||
v.AuxInt = 0
|
||||
v.Args = []*Value{arg0, arg1, arg2}
|
||||
v.Args = v.argstorage[:3]
|
||||
v.argstorage[0] = arg0
|
||||
v.argstorage[1] = arg1
|
||||
v.argstorage[2] = arg2
|
||||
arg0.Uses++
|
||||
arg1.Uses++
|
||||
arg2.Uses++
|
||||
|
|
@ -295,7 +298,10 @@ func (b *Block) NewValue3(line int32, op Op, t Type, arg0, arg1, arg2 *Value) *V
|
|||
func (b *Block) NewValue3I(line int32, op Op, t Type, auxint int64, arg0, arg1, arg2 *Value) *Value {
|
||||
v := b.Func.newValue(op, t, b, line)
|
||||
v.AuxInt = auxint
|
||||
v.Args = []*Value{arg0, arg1, arg2}
|
||||
v.Args = v.argstorage[:3]
|
||||
v.argstorage[0] = arg0
|
||||
v.argstorage[1] = arg1
|
||||
v.argstorage[2] = arg2
|
||||
arg0.Uses++
|
||||
arg1.Uses++
|
||||
arg2.Uses++
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue