diff options
Diffstat (limited to 'src/cmd/compile/internal/ssa/op.go')
-rw-r--r-- | src/cmd/compile/internal/ssa/op.go | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/ssa/op.go b/src/cmd/compile/internal/ssa/op.go index 5e6ce2b508..c64b145107 100644 --- a/src/cmd/compile/internal/ssa/op.go +++ b/src/cmd/compile/internal/ssa/op.go @@ -5,6 +5,7 @@ package ssa import ( + "cmd/compile/internal/ir" "cmd/compile/internal/types" "cmd/internal/obj" "fmt" @@ -70,7 +71,8 @@ type auxType int8 type Param struct { Type *types.Type - Offset int32 // TODO someday this will be a register + Offset int32 // Offset of Param if not in a register. + Name *ir.Name // For OwnAux, need to prepend stores with Vardefs } type AuxCall struct { @@ -199,6 +201,12 @@ func ClosureAuxCall(args []Param, results []Param) *AuxCall { func (*AuxCall) CanBeAnSSAAux() {} +// OwnAuxCall returns a function's own AuxCall +func OwnAuxCall(args []Param, results []Param) *AuxCall { + // TODO if this remains identical to ClosureAuxCall above after new ABI is done, should deduplicate. + return &AuxCall{Fn: nil, args: args, results: results} +} + const ( auxNone auxType = iota auxBool // auxInt is 0/1 for false/true |