Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 192 for isChan (0.18 sec)

  1. test/named.go

    	asBool(b)
    	isBool(b)
    	asBool(!b)
    	isBool(!b)
    	asBool(true)
    	asBool(*&b)
    	isBool(*&b)
    	asBool(Bool(true))
    	isBool(Bool(true))
    
    	asChan(c)
    	isChan(c)
    	asChan(make(Chan))
    	isChan(make(Chan))
    	asChan(*&c)
    	isChan(*&c)
    	asChan(Chan(nil))
    	isChan(Chan(nil))
    
    	asFloat(f)
    	isFloat(f)
    	asFloat(-f)
    	isFloat(-f)
    	asFloat(+f)
    	isFloat(+f)
    	asFloat(f + 1)
    	isFloat(f + 1)
    	asFloat(1 + f)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 02 13:43:18 UTC 2016
    - 4.6K bytes
    - Viewed (0)
  2. src/runtime/time.go

    	//
    	// Package time does not know about seq, but if this is a channel timer (t.isChan == true),
    	// this file uses t.seq as a sequence number to recognize and squelch
    	// sends that correspond to an earlier (stale) timer configuration,
    	// similar to its use in netpoll. In this usage (that is, when t.isChan == true),
    	// writes to seq are protected by both t.mu and t.sendLock,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 29 14:36:24 UTC 2024
    - 37.5K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/walk/walk.go

    	n := vmkcall(fn, nil, &init, args)
    	if len(init) == 0 {
    		return n
    	}
    	init.Append(n)
    	return ir.NewBlockStmt(n.Pos(), init)
    }
    
    func chanfn(name string, n int, t *types.Type) ir.Node {
    	if !t.IsChan() {
    		base.Fatalf("chanfn %v", t)
    	}
    	switch n {
    	case 1:
    		return typecheck.LookupRuntime(name, t.Elem())
    	case 2:
    		return typecheck.LookupRuntime(name, t.Elem(), t.Elem())
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 27 20:56:00 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/typecheck/subr.go

    	}
    
    	// 4. src is a bidirectional channel value, dst is a channel type,
    	// src and dst have identical element types, and
    	// either src or dst is not a named type.
    	if src.IsChan() && src.ChanDir() == types.Cboth && dst.IsChan() {
    		if types.Identical(src.Elem(), dst.Elem()) && (src.Sym() == nil || dst.Sym() == nil) {
    			return ir.OCONVNOP, ""
    		}
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 05 19:45:58 UTC 2023
    - 20.2K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/types/fmt.go

    			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)
    				b.WriteByte(')')
    			} else {
    				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)
  6. src/cmd/compile/internal/typecheck/stmt.go

    func tcSend(n *ir.SendStmt) ir.Node {
    	n.Chan = Expr(n.Chan)
    	n.Value = Expr(n.Value)
    	n.Chan = DefaultLit(n.Chan, nil)
    	t := n.Chan.Type()
    	if t == nil {
    		return n
    	}
    	if !t.IsChan() {
    		base.Errorf("invalid operation: %v (send to non-chan type %v)", n, t)
    		return n
    	}
    
    	if !t.ChanDir().CanSend() {
    		base.Errorf("invalid operation: %v (send to receive-only type %v)", n, t)
    		return n
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 20 15:10:54 UTC 2023
    - 17.8K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/typecheck/expr.go

    // 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() {
    		base.Errorf("invalid operation: %v (receive from non-chan type %v)", n, t)
    		n.SetType(nil)
    		return n
    	}
    
    	if !t.ChanDir().CanRecv() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 14:29:45 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/typecheck/func.go

    func tcClose(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() {
    		base.Errorf("invalid operation: %v (non-chan type %v)", n, t)
    		n.SetType(nil)
    		return n
    	}
    
    	if !t.ChanDir().CanSend() {
    		base.Errorf("invalid operation: %v (cannot close receive-only channel)", n)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 06 15:23:18 UTC 2024
    - 21.1K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/walk/builtin.go

    // is a correctness rewrite, not an optimization.
    func isChanLenCap(n ir.Node) bool {
    	return (n.Op() == ir.OLEN || n.Op() == ir.OCAP) && n.(*ir.UnaryExpr).X.Type().IsChan()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 08 22:35:22 UTC 2024
    - 31.2K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/types/type.go

    		return true
    	}
    	return false
    }
    
    func (t *Type) IsString() bool {
    	return t.kind == TSTRING
    }
    
    func (t *Type) IsMap() bool {
    	return t.kind == TMAP
    }
    
    func (t *Type) IsChan() bool {
    	return t.kind == TCHAN
    }
    
    func (t *Type) IsSlice() bool {
    	return t.kind == TSLICE
    }
    
    func (t *Type) IsArray() bool {
    	return t.kind == TARRAY
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 14:29:45 UTC 2024
    - 49.5K bytes
    - Viewed (0)
Back to top