Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for tcRecv (0.11 sec)

  1. src/cmd/compile/internal/typecheck/expr.go

    		n.SetType(nil)
    		return n
    	}
    
    	if kind == types.TSTRING {
    		t = types.ByteType
    	} else {
    		t = t.Elem()
    	}
    	n.SetType(types.NewPtr(t))
    	return n
    }
    
    // tcRecv typechecks an ORECV node.
    func tcRecv(n *ir.UnaryExpr) ir.Node {
    	n.X = Expr(n.X)
    	n.X = DefaultLit(n.X, nil)
    	l := n.X
    	t := l.Type()
    	if t == nil {
    		n.SetType(nil)
    		return n
    	}
    	if !t.IsChan() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 14:29:45 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/typecheck/typecheck.go

    	case ir.ODOTTYPE:
    		n := n.(*ir.TypeAssertExpr)
    		return tcDotType(n)
    
    	case ir.OINDEX:
    		n := n.(*ir.IndexExpr)
    		return tcIndex(n)
    
    	case ir.ORECV:
    		n := n.(*ir.UnaryExpr)
    		return tcRecv(n)
    
    	case ir.OSEND:
    		n := n.(*ir.SendStmt)
    		return tcSend(n)
    
    	case ir.OSLICEHEADER:
    		n := n.(*ir.SliceHeaderExpr)
    		return tcSliceHeader(n)
    
    	case ir.OSTRINGHEADER:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 20 19:08:34 UTC 2024
    - 30.5K bytes
    - Viewed (0)
  3. src/go/internal/gcimporter/support.go

    	}
    }
    
    var (
    	fakeLines     []int
    	fakeLinesOnce sync.Once
    )
    
    func chanDir(d int) types.ChanDir {
    	// tag values must match the constants in cmd/compile/internal/gc/go.go
    	switch d {
    	case 1 /* Crecv */ :
    		return types.RecvOnly
    	case 2 /* Csend */ :
    		return types.SendOnly
    	case 3 /* Cboth */ :
    		return types.SendRecv
    	default:
    		errorf("unexpected channel dir %d", d)
    		return 0
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 20:08:23 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/types/fmt.go

    	case TCHAN:
    		switch t.ChanDir() {
    		case Crecv:
    			b.WriteString("<-chan ")
    			tconv2(b, t.Elem(), 0, mode, visited)
    		case Csend:
    			b.WriteString("chan<- ")
    			tconv2(b, t.Elem(), 0, mode, visited)
    		default:
    			b.WriteString("chan ")
    			if t.Elem() != nil && t.Elem().IsChan() && t.Elem().Sym() == nil && t.Elem().ChanDir() == Crecv {
    				b.WriteByte('(')
    				tconv2(b, t.Elem(), 0, mode, visited)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 12 15:41:17 UTC 2023
    - 15.7K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/typecheck/mkbuiltin.go

    	case *ast.ChanType:
    		dir := "types.Cboth"
    		switch t.Dir {
    		case ast.SEND:
    			dir = "types.Csend"
    		case ast.RECV:
    			dir = "types.Crecv"
    		}
    		return fmt.Sprintf("types.NewChan(%s, %s)", i.subtype(t.Value), dir)
    	case *ast.FuncType:
    		return fmt.Sprintf("newSig(%s, %s)", i.fields(t.Params, false), i.fields(t.Results, false))
    	case *ast.InterfaceType:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jan 26 21:56:49 UTC 2023
    - 6K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/types/type.go

    type ChanDir uint8
    
    func (c ChanDir) CanRecv() bool { return c&Crecv != 0 }
    func (c ChanDir) CanSend() bool { return c&Csend != 0 }
    
    const (
    	// types of channel
    	// must match ../../../../reflect/type.go:/ChanDir
    	Crecv ChanDir = 1 << 0
    	Csend ChanDir = 1 << 1
    	Cboth ChanDir = Crecv | Csend
    )
    
    // Types stores pointers to predeclared named types.
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 14:29:45 UTC 2024
    - 49.5K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/typecheck/builtin.go

    	typs[97] = types.NewChan(typs[2], types.Cboth)
    	typs[98] = newSig(params(typs[1], typs[22]), params(typs[97]))
    	typs[99] = newSig(params(typs[1], typs[15]), params(typs[97]))
    	typs[100] = types.NewChan(typs[2], types.Crecv)
    	typs[101] = newSig(params(typs[100], typs[3]), nil)
    	typs[102] = newSig(params(typs[100], typs[3]), params(typs[6]))
    	typs[103] = types.NewChan(typs[2], types.Csend)
    	typs[104] = newSig(params(typs[103], typs[3]), nil)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 21 21:08:03 UTC 2024
    - 16.2K bytes
    - Viewed (0)
Back to top