Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 17 for ChanDir (0.11 sec)

  1. src/go/types/chan.go

    type Chan struct {
    	dir  ChanDir
    	elem Type
    }
    
    // A ChanDir value indicates a channel direction.
    type ChanDir int
    
    // The direction of a channel is indicated by one of these constants.
    const (
    	SendRecv ChanDir = iota
    	SendOnly
    	RecvOnly
    )
    
    // NewChan returns a new channel type for the given direction and element type.
    func NewChan(dir ChanDir, elem Type) *Chan {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 03 18:48:38 UTC 2024
    - 1K bytes
    - Viewed (0)
  2. src/reflect/badlinkname.go

    //go:linkname badlinkname_rtype_Bits reflect.(*rtype).Bits
    func badlinkname_rtype_Bits(*rtype) int
    
    //go:linkname badlinkname_rtype_ChanDir reflect.(*rtype).ChanDir
    func badlinkname_rtype_ChanDir(*rtype) ChanDir
    
    //go:linkname badlinkname_rtype_Comparable reflect.(*rtype).Comparable
    func badlinkname_rtype_Comparable(*rtype) bool
    
    //go:linkname badlinkname_rtype_ConvertibleTo reflect.(*rtype).ConvertibleTo
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  3. src/go/internal/gcimporter/support.go

    			fakeLines[i] = i
    		}
    	})
    	for _, f := range s.files {
    		f.file.SetLines(fakeLines[:f.lastline])
    	}
    }
    
    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 */ :
    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/type.go

    	NTYPE
    )
    
    // ChanDir is whether a channel can send, receive, or both.
    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
    )
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 14:29:45 UTC 2024
    - 49.5K bytes
    - Viewed (0)
  5. src/internal/abi/type.go

    func (t *Type) Common() *Type {
    	return t
    }
    
    type ChanDir int
    
    const (
    	RecvDir    ChanDir = 1 << iota         // <-chan
    	SendDir                                // chan<-
    	BothDir            = RecvDir | SendDir // chan
    	InvalidDir ChanDir = 0
    )
    
    // ChanType represents a channel type
    type ChanType struct {
    	Type
    	Elem *Type
    	Dir  ChanDir
    }
    
    type structTypeUncommon struct {
    	StructType
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 17 21:09:59 UTC 2024
    - 21.8K bytes
    - Viewed (0)
  6. src/reflect/type.go

    		i--
    	}
    	return s[i+1:]
    }
    
    func nameFor(t *abi.Type) string {
    	return toRType(t).Name()
    }
    
    func (t *rtype) ChanDir() ChanDir {
    	if t.Kind() != Chan {
    		panic("reflect: ChanDir of non-chan type " + t.String())
    	}
    	tt := (*abi.ChanType)(unsafe.Pointer(t))
    	return ChanDir(tt.Dir)
    }
    
    func toRType(t *abi.Type) *rtype {
    	return (*rtype)(unsafe.Pointer(t))
    }
    
    func elem(t *abi.Type) *abi.Type {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 85.5K bytes
    - Viewed (0)
  7. src/internal/reflectlite/type.go

    		// x is a bidirectional channel value, T is a channel type,
    		// and x's type V and T have identical element types.
    		if V.ChanDir() == abi.BothDir && haveIdenticalType(T.Elem(), V.Elem(), cmpTags) {
    			return true
    		}
    
    		// Otherwise continue test for identical underlying type.
    		return V.ChanDir() == T.ChanDir() && haveIdenticalType(T.Elem(), V.Elem(), cmpTags)
    
    	case abi.Func:
    		t := (*funcType)(unsafe.Pointer(T))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 17:01:54 UTC 2024
    - 16.2K bytes
    - Viewed (0)
  8. src/go/ast/ast.go

    		Colon token.Pos // position of ":"
    		Value Expr
    	}
    )
    
    // The direction of a channel type is indicated by a bit
    // mask including one or both of the following constants.
    type ChanDir int
    
    const (
    	SEND ChanDir = 1 << iota
    	RECV
    )
    
    // A type is represented by a tree consisting of one
    // or more of the following type-specific expression
    // nodes.
    type (
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 28 21:32:41 UTC 2024
    - 35.6K bytes
    - Viewed (0)
  9. src/cmd/vendor/golang.org/x/tools/internal/analysisinternal/analysis.go

    		value := TypeExpr(f, pkg, t.Elem())
    		if key == nil || value == nil {
    			return nil
    		}
    		return &ast.MapType{
    			Key:   key,
    			Value: value,
    		}
    	case *types.Chan:
    		dir := ast.ChanDir(t.Dir())
    		if t.Dir() == types.SendRecv {
    			dir = ast.SEND | ast.RECV
    		}
    		value := TypeExpr(f, pkg, t.Elem())
    		if value == nil {
    			return nil
    		}
    		return &ast.ChanType{
    			Dir:   dir,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 11.7K bytes
    - Viewed (0)
  10. src/go/internal/gcimporter/iimport.go

    		return types.NewPointer(r.typ())
    	case sliceType:
    		return types.NewSlice(r.typ())
    	case arrayType:
    		n := r.uint64()
    		return types.NewArray(r.typ(), int64(n))
    	case chanType:
    		dir := chanDir(int(r.uint64()))
    		return types.NewChan(dir, r.typ())
    	case mapType:
    		return types.NewMap(r.typ(), r.typ())
    	case signatureType:
    		r.currPkg = r.pkg()
    		return r.signature(nil, nil, nil)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 19.2K bytes
    - Viewed (0)
Back to top