From c63ad970f6dc497b2cd529357201dd46bc3ee9b0 Mon Sep 17 00:00:00 2001 From: Josh Bleecher Snyder Date: Wed, 8 Mar 2017 12:45:12 -0800 Subject: [PATCH] cmd/compile: rename Func.constVal arg for clarity Values have an Aux and an AuxInt. We're setting AuxInt, not Aux. Say so. Change-Id: I41aa783273bb7e1ba47c941aa4233f818e37dadd Reviewed-on: https://go-review.googlesource.com/37997 Run-TryBot: Josh Bleecher Snyder TryBot-Result: Gobot Gobot Reviewed-by: Brad Fitzpatrick --- src/cmd/compile/internal/ssa/func.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cmd/compile/internal/ssa/func.go b/src/cmd/compile/internal/ssa/func.go index 439e0b0394..f16e7d07bd 100644 --- a/src/cmd/compile/internal/ssa/func.go +++ b/src/cmd/compile/internal/ssa/func.go @@ -335,21 +335,21 @@ func (b *Block) NewValue4(pos src.XPos, op Op, t Type, arg0, arg1, arg2, arg3 *V } // constVal returns a constant value for c. -func (f *Func) constVal(pos src.XPos, op Op, t Type, c int64, setAux bool) *Value { +func (f *Func) constVal(pos src.XPos, op Op, t Type, c int64, setAuxInt bool) *Value { if f.constants == nil { f.constants = make(map[int64][]*Value) } vv := f.constants[c] for _, v := range vv { if v.Op == op && v.Type.Compare(t) == CMPeq { - if setAux && v.AuxInt != c { + if setAuxInt && v.AuxInt != c { panic(fmt.Sprintf("cached const %s should have AuxInt of %d", v.LongString(), c)) } return v } } var v *Value - if setAux { + if setAuxInt { v = f.Entry.NewValue0I(pos, op, t, c) } else { v = f.Entry.NewValue0(pos, op, t) -- 2.48.1