Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 28 for ChanDir (0.12 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/cmd/compile/internal/types2/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: Thu Jul 01 22:17:50 UTC 2021
    - 910 bytes
    - Viewed (0)
  3. src/cmd/compile/internal/types/identity.go

    				return false
    			}
    		}
    		return true
    
    	case TARRAY:
    		if t1.NumElem() != t2.NumElem() {
    			return false
    		}
    
    	case TCHAN:
    		if t1.ChanDir() != t2.ChanDir() {
    			return false
    		}
    
    	case TMAP:
    		if !identical(t1.Key(), t2.Key(), flags, assumedEqual) {
    			return false
    		}
    	}
    
    	return identical(t1.Elem(), t2.Elem(), flags, assumedEqual)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 22 20:57:01 UTC 2023
    - 4.6K bytes
    - Viewed (0)
  4. 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)
  5. 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)
  6. src/cmd/compile/internal/syntax/nodes.go

    	// <-chan Elem
    	// chan<- Elem
    	ChanType struct {
    		Dir  ChanDir // 0 means no direction
    		Elem Expr
    		expr
    	}
    )
    
    type expr struct {
    	node
    	typeAndValue // After typechecking, contains the results of typechecking this expression.
    }
    
    func (*expr) aExpr() {}
    
    type ChanDir uint
    
    const (
    	_ ChanDir = iota
    	SendOnly
    	RecvOnly
    )
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 20 14:52:38 UTC 2023
    - 9K bytes
    - Viewed (0)
  7. 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)
  8. src/go/internal/gccgoimporter/testdata/v1reflect.gox

     func (k <type 28>) String () <type -16>;
    >; Implements (u <type 26>) <type -15>; AssignableTo (u <type 26>) <type -15>; Bits () <type -11>; ChanDir () <type 29 "ChanDir" <type -11>
     func (d <type 29>) String () <type -16>;
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 30 21:33:51 UTC 2021
    - 10.3K bytes
    - Viewed (0)
  9. 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)
  10. src/go/internal/gccgoimporter/importer_test.go

    	{pkgpath: "issue27856", name: "M", gccgoVersion: 7, want: "type M struct{E F}"},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 15 20:17:57 UTC 2022
    - 7.2K bytes
    - Viewed (0)
Back to top