// MakeDotArgs package all the arguments that match a ... T parameter into a []T. func MakeDotArgs(pos src.XPos, typ *types.Type, args []ir.Node) ir.Node { … } // FixVariadicCall rewrites calls to variadic functions to use an // explicit ... argument if one is not already present. func FixVariadicCall(call *ir.CallExpr) { … } // FixMethodCall rewrites a method call t.M(...) into a function call T.M(t, ...). func FixMethodCall(call *ir.CallExpr) { … } func AssertFixedCall(call *ir.CallExpr) { … } // ClosureType returns the struct type used to hold all the information // needed in the closure for clo (clo must be a OCLOSURE node). // The address of a variable of the returned type can be cast to a func. func ClosureType(clo *ir.ClosureExpr) *types.Type { … } // MethodValueType returns the struct type used to hold all the information // needed in the closure for a OMETHVALUE node. The address of a variable of // the returned type can be cast to a func. func MethodValueType(n *ir.SelectorExpr) *types.Type { … } // type check function definition // To be called by typecheck, not directly. // (Call typecheck.Func instead.) func tcFunc(n *ir.Func) { … } // tcCall typechecks an OCALL node. func tcCall(n *ir.CallExpr, top int) ir.Node { … } // tcAppend typechecks an OAPPEND node. func tcAppend(n *ir.CallExpr) ir.Node { … } // tcClear typechecks an OCLEAR node. func tcClear(n *ir.UnaryExpr) ir.Node { … } // tcClose typechecks an OCLOSE node. func tcClose(n *ir.UnaryExpr) ir.Node { … } // tcComplex typechecks an OCOMPLEX node. func tcComplex(n *ir.BinaryExpr) ir.Node { … } // tcCopy typechecks an OCOPY node. func tcCopy(n *ir.BinaryExpr) ir.Node { … } // tcDelete typechecks an ODELETE node. func tcDelete(n *ir.CallExpr) ir.Node { … } // tcMake typechecks an OMAKE node. func tcMake(n *ir.CallExpr) ir.Node { … } // tcMakeSliceCopy typechecks an OMAKESLICECOPY node. func tcMakeSliceCopy(n *ir.MakeExpr) ir.Node { … } // tcNew typechecks an ONEW node. func tcNew(n *ir.UnaryExpr) ir.Node { … } // tcPanic typechecks an OPANIC node. func tcPanic(n *ir.UnaryExpr) ir.Node { … } // tcPrint typechecks an OPRINT or OPRINTN node. func tcPrint(n *ir.CallExpr) ir.Node { … } // tcMinMax typechecks an OMIN or OMAX node. func tcMinMax(n *ir.CallExpr) ir.Node { … } // tcRealImag typechecks an OREAL or OIMAG node. func tcRealImag(n *ir.UnaryExpr) ir.Node { … } // tcRecover typechecks an ORECOVER node. func tcRecover(n *ir.CallExpr) ir.Node { … } // tcUnsafeAdd typechecks an OUNSAFEADD node. func tcUnsafeAdd(n *ir.BinaryExpr) *ir.BinaryExpr { … } // tcUnsafeSlice typechecks an OUNSAFESLICE node. func tcUnsafeSlice(n *ir.BinaryExpr) *ir.BinaryExpr { … } // tcUnsafeString typechecks an OUNSAFESTRING node. func tcUnsafeString(n *ir.BinaryExpr) *ir.BinaryExpr { … } type ClosureStructIter … // NewClosureStructIter creates a new ClosureStructIter for closureVars. func NewClosureStructIter(closureVars []*ir.Name) *ClosureStructIter { … } // Next returns the next name, type and offset of the next closure variable. // A nil name is returned after the last closure variable. func (iter *ClosureStructIter) Next() (n *ir.Name, typ *types.Type, offset int64) { … }