Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for NewNilExpr (0.31 sec)

  1. src/cmd/compile/internal/ir/const.go

    }
    
    // NewZero returns a zero value of the given type.
    func NewZero(pos src.XPos, typ *types.Type) Node {
    	switch {
    	case typ.HasNil():
    		return NewNilExpr(pos, typ)
    	case typ.IsInteger():
    		return NewBasicLit(pos, typ, intZero)
    	case typ.IsFloat():
    		return NewBasicLit(pos, typ, floatZero)
    	case typ.IsComplex():
    		return NewBasicLit(pos, typ, complexZero)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 12 18:53:26 UTC 2023
    - 4K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/typecheck/subr.go

    func LinksymAddr(pos src.XPos, lsym *obj.LSym, typ *types.Type) *ir.AddrExpr {
    	n := ir.NewLinksymExpr(pos, lsym, typ)
    	return Expr(NodAddrAt(pos, n)).(*ir.AddrExpr)
    }
    
    func NodNil() ir.Node {
    	return ir.NewNilExpr(base.Pos, types.Types[types.TNIL])
    }
    
    // AddImplicitDots finds missing fields in obj.field that
    // will give the shortest unique addressing and
    // modifies the tree with missing field names.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 05 19:45:58 UTC 2023
    - 20.2K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/typecheck/func.go

    	"go/token"
    )
    
    // 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 {
    	if len(args) == 0 {
    		return ir.NewNilExpr(pos, typ)
    	}
    
    	args = append([]ir.Node(nil), args...)
    	lit := ir.NewCompLitExpr(pos, ir.OCOMPLIT, typ, args)
    	lit.SetImplicit(true)
    
    	n := Expr(lit)
    	if n.Type() == nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 06 15:23:18 UTC 2024
    - 21.1K bytes
    - Viewed (0)
Back to top