1
0
mirror of https://github.com/golang/go synced 2024-10-05 20:31:20 -06:00

[dev.ssa] cmd/compile/internal/ssa: set Line in NewValue funcs

In the previous line number CL the NewValue\d? functions took
a line number argument but neglected to set the Line field on
the value struct. Fix that.

Change-Id: I53c79ff93703f66f5f0266178c94803719ae2074
Reviewed-on: https://go-review.googlesource.com/11054
Reviewed-by: Keith Randall <khr@golang.org>
This commit is contained in:
Michael Matloob 2015-06-13 11:01:16 -07:00 committed by Michael Matloob
parent 47791c1a18
commit 3a0df1f82a

View File

@ -85,6 +85,7 @@ func (b *Block) NewValue0A(line int32, op Op, t Type, aux interface{}) *Value {
Type: t,
Aux: aux,
Block: b,
Line: line,
}
v.Args = v.argstorage[:0]
b.Values = append(b.Values, v)
@ -143,6 +144,7 @@ func (b *Block) NewValue1A(line int32, op Op, t Type, aux interface{}, arg *Valu
Type: t,
Aux: aux,
Block: b,
Line: line,
}
v.Args = v.argstorage[:1]
v.Args[0] = arg
@ -173,6 +175,7 @@ func (b *Block) NewValue2(line int32, op Op, t Type, arg0, arg1 *Value) *Value {
Op: op,
Type: t,
Block: b,
Line: line,
}
v.Args = v.argstorage[:2]
v.Args[0] = arg0
@ -188,6 +191,7 @@ func (b *Block) NewValue3(line int32, op Op, t Type, arg0, arg1, arg2 *Value) *V
Op: op,
Type: t,
Block: b,
Line: line,
}
v.Args = []*Value{arg0, arg1, arg2}
b.Values = append(b.Values, v)