Commit 3a0df1f8 authored by Michael Matloob's avatar Michael Matloob Committed by Michael Matloob

[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/11054Reviewed-by: 's avatarKeith Randall <khr@golang.org>
parent 47791c1a
...@@ -85,6 +85,7 @@ func (b *Block) NewValue0A(line int32, op Op, t Type, aux interface{}) *Value { ...@@ -85,6 +85,7 @@ func (b *Block) NewValue0A(line int32, op Op, t Type, aux interface{}) *Value {
Type: t, Type: t,
Aux: aux, Aux: aux,
Block: b, Block: b,
Line: line,
} }
v.Args = v.argstorage[:0] v.Args = v.argstorage[:0]
b.Values = append(b.Values, v) b.Values = append(b.Values, v)
...@@ -143,6 +144,7 @@ func (b *Block) NewValue1A(line int32, op Op, t Type, aux interface{}, arg *Valu ...@@ -143,6 +144,7 @@ func (b *Block) NewValue1A(line int32, op Op, t Type, aux interface{}, arg *Valu
Type: t, Type: t,
Aux: aux, Aux: aux,
Block: b, Block: b,
Line: line,
} }
v.Args = v.argstorage[:1] v.Args = v.argstorage[:1]
v.Args[0] = arg v.Args[0] = arg
...@@ -173,6 +175,7 @@ func (b *Block) NewValue2(line int32, op Op, t Type, arg0, arg1 *Value) *Value { ...@@ -173,6 +175,7 @@ func (b *Block) NewValue2(line int32, op Op, t Type, arg0, arg1 *Value) *Value {
Op: op, Op: op,
Type: t, Type: t,
Block: b, Block: b,
Line: line,
} }
v.Args = v.argstorage[:2] v.Args = v.argstorage[:2]
v.Args[0] = arg0 v.Args[0] = arg0
...@@ -188,6 +191,7 @@ func (b *Block) NewValue3(line int32, op Op, t Type, arg0, arg1, arg2 *Value) *V ...@@ -188,6 +191,7 @@ func (b *Block) NewValue3(line int32, op Op, t Type, arg0, arg1, arg2 *Value) *V
Op: op, Op: op,
Type: t, Type: t,
Block: b, Block: b,
Line: line,
} }
v.Args = []*Value{arg0, arg1, arg2} v.Args = []*Value{arg0, arg1, arg2}
b.Values = append(b.Values, v) b.Values = append(b.Values, v)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment