]> Cypherpunks repositories - gostls13.git/commitdiff
[dev.ssa] cmd/compile/internal/ssa: set Line in NewValue funcs
authorMichael Matloob <matloob@google.com>
Sat, 13 Jun 2015 18:01:16 +0000 (11:01 -0700)
committerMichael Matloob <michaelmatloob@gmail.com>
Sun, 14 Jun 2015 16:46:01 +0000 (16:46 +0000)
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>
src/cmd/compile/internal/ssa/func.go

index 2e1b5990dc2cb674d918363acec8eabc47a4e387..c71e6d4e388114d7aeb982f3d81345418be3f81e 100644 (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)