func tcShift(n, l, r ir.Node) (ir.Node, ir.Node, *types.Type) { … } // tcArith typechecks operands of a binary arithmetic expression. // The result of tcArith MUST be assigned back to original operands, // t is the type of the expression, and should be set by the caller. e.g: // // n.X, n.Y, t = tcArith(n, op, n.X, n.Y) // n.SetType(t) func tcArith(n ir.Node, op ir.Op, l, r ir.Node) (ir.Node, ir.Node, *types.Type) { … } // The result of tcCompLit MUST be assigned back to n, e.g. // // n.Left = tcCompLit(n.Left) func tcCompLit(n *ir.CompLitExpr) (res ir.Node) { … } // tcStructLitKey typechecks an OKEY node that appeared within a // struct literal. func tcStructLitKey(typ *types.Type, kv *ir.KeyExpr) *ir.StructKeyExpr { … } // tcConv typechecks an OCONV node. func tcConv(n *ir.ConvExpr) ir.Node { … } // DotField returns a field selector expression that selects the // index'th field of the given expression, which must be of struct or // pointer-to-struct type. func DotField(pos src.XPos, x ir.Node, index int) *ir.SelectorExpr { … } func dot(pos src.XPos, typ *types.Type, op ir.Op, x ir.Node, selection *types.Field) *ir.SelectorExpr { … } // XDotField returns an expression representing the field selection // x.sym. If any implicit field selection are necessary, those are // inserted too. func XDotField(pos src.XPos, x ir.Node, sym *types.Sym) *ir.SelectorExpr { … } // XDotMethod returns an expression representing the method value // x.sym (i.e., x is a value, not a type). If any implicit field // selection are necessary, those are inserted too. // // If callee is true, the result is an ODOTMETH/ODOTINTER, otherwise // an OMETHVALUE. func XDotMethod(pos src.XPos, x ir.Node, sym *types.Sym, callee bool) *ir.SelectorExpr { … } // tcDot typechecks an OXDOT or ODOT node. func tcDot(n *ir.SelectorExpr, top int) ir.Node { … } // tcDotType typechecks an ODOTTYPE node. func tcDotType(n *ir.TypeAssertExpr) ir.Node { … } // tcITab typechecks an OITAB node. func tcITab(n *ir.UnaryExpr) ir.Node { … } // tcIndex typechecks an OINDEX node. func tcIndex(n *ir.IndexExpr) ir.Node { … } // tcLenCap typechecks an OLEN or OCAP node. func tcLenCap(n *ir.UnaryExpr) ir.Node { … } // tcUnsafeData typechecks an OUNSAFESLICEDATA or OUNSAFESTRINGDATA node. func tcUnsafeData(n *ir.UnaryExpr) ir.Node { … } // tcRecv typechecks an ORECV node. func tcRecv(n *ir.UnaryExpr) ir.Node { … } // tcSPtr typechecks an OSPTR node. func tcSPtr(n *ir.UnaryExpr) ir.Node { … } // tcSlice typechecks an OSLICE or OSLICE3 node. func tcSlice(n *ir.SliceExpr) ir.Node { … } // tcSliceHeader typechecks an OSLICEHEADER node. func tcSliceHeader(n *ir.SliceHeaderExpr) ir.Node { … } // tcStringHeader typechecks an OSTRINGHEADER node. func tcStringHeader(n *ir.StringHeaderExpr) ir.Node { … } // tcStar typechecks an ODEREF node, which may be an expression or a type. func tcStar(n *ir.StarExpr, top int) ir.Node { … } // tcUnaryArith typechecks a unary arithmetic expression. func tcUnaryArith(n *ir.UnaryExpr) ir.Node { … }