- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 47 for ChanType (0.16 sec)
-
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) -
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) -
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) -
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) -
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) -
src/reflect/value.go
} // Close closes the channel v. // 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()) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 21:17:41 UTC 2024 - 119.9K bytes - Viewed (0) -
src/go/printer/printer_test.go
// ParenExpr, is correctly formatted with parens. // Test case for issue #63362. func TestChanType(t *testing.T) { expr := &ast.UnaryExpr{ Op: token.ARROW, X: &ast.CallExpr{ Fun: &ast.ChanType{ Dir: ast.RECV, Value: &ast.Ident{Name: "int"}, }, Args: []ast.Expr{&ast.Ident{Name: "nil"}}, }, } var buf bytes.Buffer if err := Fprint(&buf, fset, expr); err != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jun 03 14:56:25 UTC 2024 - 20.4K bytes - Viewed (0) -
src/go/types/expr.go
*ast.IndexExpr, *ast.SliceExpr, *ast.TypeAssertExpr, *ast.StarExpr, *ast.KeyValueExpr, *ast.ArrayType, *ast.StructType, *ast.FuncType, *ast.InterfaceType, *ast.MapType, *ast.ChanType: // These expression are never untyped - nothing to do. // The respective sub-expressions got their final types // upon assignment or use. if debug {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 29 02:09:54 UTC 2024 - 49.7K bytes - Viewed (0) -
src/cmd/compile/internal/types2/expr.go
*syntax.ListExpr, //*syntax.StarExpr, *syntax.KeyValueExpr, *syntax.ArrayType, *syntax.StructType, *syntax.FuncType, *syntax.InterfaceType, *syntax.MapType, *syntax.ChanType: // These expression are never untyped - nothing to do. // The respective sub-expressions got their final types // upon assignment or use. if debug {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 29 02:09:54 UTC 2024 - 51.7K bytes - Viewed (0) -
src/cmd/internal/dwarf/dwarf.go
{DW_AT_name, DW_FORM_string}, {DW_AT_type, DW_FORM_ref_addr}, {DW_AT_byte_size, DW_FORM_udata}, {DW_AT_go_kind, DW_FORM_data1}, {DW_AT_go_runtime_type, DW_FORM_addr}, }, }, /* CHANTYPE */ { DW_TAG_typedef, DW_CHILDREN_no, []dwAttrForm{ {DW_AT_name, DW_FORM_string}, {DW_AT_type, DW_FORM_ref_addr}, {DW_AT_go_kind, DW_FORM_data1}, {DW_AT_go_runtime_type, DW_FORM_addr},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Mar 06 15:23:18 UTC 2024 - 43K bytes - Viewed (0)