Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for ChanDir (0.28 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. src/go/internal/gcimporter/ureader.go

    	case pkgbits.TypeTypeParam:
    		return r.dict.tparams[r.Len()]
    
    	case pkgbits.TypeArray:
    		len := int64(r.Uint64())
    		return types.NewArray(r.typ(), len)
    	case pkgbits.TypeChan:
    		dir := types.ChanDir(r.Len())
    		return types.NewChan(dir, r.typ())
    	case pkgbits.TypeMap:
    		return types.NewMap(r.typ(), r.typ())
    	case pkgbits.TypePointer:
    		return types.NewPointer(r.typ())
    	case pkgbits.TypeSignature:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 16.6K bytes
    - Viewed (0)
  9. src/reflect/value.go

    // It panics if v's Kind is not [Chan] or
    // v is a receive-only channel.
    func (v Value) Close() {
    	v.mustBe(Chan)
    	v.mustBeExported()
    	tt := (*chanType)(unsafe.Pointer(v.typ()))
    	if ChanDir(tt.Dir)&SendDir == 0 {
    		panic("reflect: close of receive-only channel")
    	}
    
    	chanclose(v.pointer())
    }
    
    // CanComplex reports whether [Value.Complex] can be used without panicking.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 21:17:41 UTC 2024
    - 119.9K bytes
    - Viewed (0)
  10. src/text/template/exec.go

    			break
    		}
    		om := fmtsort.Sort(val)
    		for _, m := range om {
    			oneIteration(m.Key, m.Value)
    		}
    		return
    	case reflect.Chan:
    		if val.IsNil() {
    			break
    		}
    		if val.Type().ChanDir() == reflect.SendDir {
    			s.errorf("range over send-only channel %v", val)
    			break
    		}
    		i := 0
    		for ; ; i++ {
    			elem, ok := val.Recv()
    			if !ok {
    				break
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 21:22:24 UTC 2024
    - 32K bytes
    - Viewed (0)
Back to top