Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 40 for ChanType (0.13 sec)

  1. src/cmd/vendor/golang.org/x/tools/internal/analysisinternal/analysis.go

    		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,
    			Value: value,
    		}
    	case *types.Signature:
    		var params []*ast.Field
    		for i := 0; i < t.Params().Len(); i++ {
    			p := TypeExpr(f, pkg, t.Params().At(i).Type())
    			if p == nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 11.7K bytes
    - Viewed (0)
  2. src/go/ast/filter.go

    			t.Incomplete = true
    		}
    		return len(t.Methods.List) > 0
    	case *MapType:
    		b1 := filterType(t.Key, f, export)
    		b2 := filterType(t.Value, f, export)
    		return b1 || b2
    	case *ChanType:
    		return filterType(t.Value, f, export)
    	}
    	return false
    }
    
    func filterSpec(spec Spec, f Filter, export bool) bool {
    	switch s := spec.(type) {
    	case *ValueSpec:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  3. src/reflect/type.go

    	BothDir = RecvDir | SendDir             // chan
    )
    
    // arrayType represents a fixed array type.
    type arrayType = abi.ArrayType
    
    // chanType represents a channel type.
    type chanType = abi.ChanType
    
    // funcType represents a function type.
    //
    // A *rtype for each in and out parameter is stored in an array that
    // directly follows the funcType (and possibly its uncommonType). So
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 85.5K bytes
    - Viewed (0)
  4. src/go/internal/gccgoimporter/parser.go

    	t := new(types.Map)
    	p.update(t, nlist)
    
    	p.expect('[')
    	key := p.parseType(pkg)
    	p.expect(']')
    	elem := p.parseType(pkg)
    
    	*t = *types.NewMap(key, elem)
    	return t
    }
    
    // ChanType = "chan" ["<-" | "-<"] Type .
    func (p *parser) parseChanType(pkg *types.Package, nlist []any) types.Type {
    	p.expectKeyword("chan")
    
    	t := new(types.Chan)
    	p.update(t, nlist)
    
    	dir := types.SendRecv
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 02 23:14:07 UTC 2024
    - 31.2K bytes
    - Viewed (0)
  5. src/cmd/vendor/golang.org/x/tools/go/ast/astutil/rewrite.go

    	case *ast.InterfaceType:
    		a.apply(n, "Methods", nil, n.Methods)
    
    	case *ast.MapType:
    		a.apply(n, "Key", nil, n.Key)
    		a.apply(n, "Value", nil, n.Value)
    
    	case *ast.ChanType:
    		a.apply(n, "Value", nil, n.Value)
    
    	// Statements
    	case *ast.BadStmt:
    		// nothing to do
    
    	case *ast.DeclStmt:
    		a.apply(n, "Decl", nil, n.Decl)
    
    	case *ast.EmptyStmt:
    		// nothing to do
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 18 21:28:13 UTC 2023
    - 12.2K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/types/type.go

    }
    
    // Chan contains Type fields specific to channel types.
    type Chan struct {
    	Elem *Type   // element type
    	Dir  ChanDir // channel direction
    }
    
    // chanType returns t's extra channel-specific fields.
    func (t *Type) chanType() *Chan {
    	t.wantEtype(TCHAN)
    	return t.extra.(*Chan)
    }
    
    type Tuple struct {
    	first  *Type
    	second *Type
    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/link/internal/ld/deadcode.go

    		off += arch.PtrSize // 4 bytes, pointer aligned
    	case abi.Slice: // reflect.sliceType
    		off += arch.PtrSize
    	case abi.Array: // reflect.arrayType
    		off += 3 * arch.PtrSize
    	case abi.Chan: // reflect.chanType
    		off += 2 * arch.PtrSize
    	case abi.Map: // reflect.mapType
    		off += 4*arch.PtrSize + 8
    	case abi.Interface: // reflect.interfaceType
    		off += 3 * arch.PtrSize
    	default:
    		// just Sizeof(rtype)
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 14:52:41 UTC 2024
    - 19K bytes
    - Viewed (0)
  8. src/go/types/typexpr.go

    				}
    				check.errorf(e.Key, IncomparableMapKey, "invalid map key type %s%s", typ.key, why)
    			}
    		}).describef(e.Key, "check map key %s", typ.key)
    
    		return typ
    
    	case *ast.ChanType:
    		typ := new(Chan)
    		setDefType(def, typ)
    
    		dir := SendRecv
    		switch e.Dir {
    		case ast.SEND | ast.RECV:
    			// nothing to do
    		case ast.SEND:
    			dir = SendOnly
    		case ast.RECV:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 16.3K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/types2/typexpr.go

    				}
    				check.errorf(e.Key, IncomparableMapKey, "invalid map key type %s%s", typ.key, why)
    			}
    		}).describef(e.Key, "check map key %s", typ.key)
    
    		return typ
    
    	case *syntax.ChanType:
    		typ := new(Chan)
    		setDefType(def, typ)
    
    		dir := SendRecv
    		switch e.Dir {
    		case 0:
    			// nothing to do
    		case syntax.SendOnly:
    			dir = SendOnly
    		case syntax.RecvOnly:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 16.6K bytes
    - Viewed (0)
  10. src/go/printer/nodes.go

    func isTypeElem(x ast.Expr) bool {
    	switch x := x.(type) {
    	case *ast.ArrayType, *ast.StructType, *ast.FuncType, *ast.InterfaceType, *ast.MapType, *ast.ChanType:
    		return true
    	case *ast.UnaryExpr:
    		return x.Op == token.TILDE
    	case *ast.BinaryExpr:
    		return isTypeElem(x.X) || isTypeElem(x.Y)
    	case *ast.ParenExpr:
    		return isTypeElem(x.X)
    	}
    	return false
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 17 18:53:17 UTC 2023
    - 52.6K bytes
    - Viewed (0)
Back to top