Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 23 for sliceType (0.28 sec)

  1. src/runtime/iface.go

    	uint16Type *_type = efaceOf(&uint16Eface)._type
    	uint32Type *_type = efaceOf(&uint32Eface)._type
    	uint64Type *_type = efaceOf(&uint64Eface)._type
    	stringType *_type = efaceOf(&stringEface)._type
    	sliceType  *_type = efaceOf(&sliceEface)._type
    )
    
    // The conv and assert functions below do very similar things.
    // The convXXX functions are guaranteed by the compiler to succeed.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 22.5K bytes
    - Viewed (0)
  2. src/reflect/value.go

    		}
    		tt := (*arrayType)(unsafe.Pointer(v.typ()))
    		cap = int(tt.Len)
    		typ = (*sliceType)(unsafe.Pointer(tt.Slice))
    		base = v.ptr
    
    	case Slice:
    		typ = (*sliceType)(unsafe.Pointer(v.typ()))
    		s := (*unsafeheader.Slice)(v.ptr)
    		base = s.Data
    		cap = s.Cap
    
    	case String:
    		s := (*unsafeheader.String)(v.ptr)
    		if i < 0 || j < i || j > s.Len {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 21:17:41 UTC 2024
    - 119.9K bytes
    - Viewed (0)
  3. src/reflect/type.go

    // mapType represents a map type.
    type mapType struct {
    	abi.MapType
    }
    
    // ptrType represents a pointer type.
    type ptrType struct {
    	abi.PtrType
    }
    
    // sliceType represents a slice type.
    type sliceType struct {
    	abi.SliceType
    }
    
    // Struct field
    type structField = abi.StructField
    
    // structType represents a struct type.
    type structType struct {
    	abi.StructType
    }
    
    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/cmd/compile/internal/types2/typexpr.go

    			typ.len = -1
    		}
    		typ.elem = check.varType(e.Elem)
    		if typ.len >= 0 {
    			return typ
    		}
    		// report error if we encountered [...]
    
    	case *syntax.SliceType:
    		typ := new(Slice)
    		setDefType(def, typ)
    		typ.elem = check.varType(e.Elem)
    		return typ
    
    	case *syntax.DotsType:
    		// dots are handled explicitly where they are legal
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 16.6K bytes
    - Viewed (0)
  5. src/runtime/arena.go

    	var x any
    	switch t.Kind_ & abi.KindMask {
    	case abi.String:
    		s1 := s.(string)
    		s2, b := rawstring(len(s1))
    		copy(b, s1)
    		x = s2
    	case abi.Slice:
    		len := (*slice)(e.data).len
    		et := (*slicetype)(unsafe.Pointer(t)).Elem
    		sl := new(slice)
    		*sl = slice{makeslicecopy(et, len, len, (*slice)(e.data).array), len, len}
    		xe := efaceOf(&x)
    		xe._type = t
    		xe.data = unsafe.Pointer(sl)
    	case abi.Pointer:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 17:44:56 UTC 2024
    - 37.9K bytes
    - Viewed (0)
  6. src/cmd/link/internal/ld/deadcode.go

    		off += 4 * arch.PtrSize
    	case abi.Pointer: // reflect.ptrType
    		off += arch.PtrSize
    	case abi.Func: // reflect.funcType
    		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
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 14:52:41 UTC 2024
    - 19K bytes
    - Viewed (0)
  7. src/runtime/cgocall.go

    		if !cgoIsGoPointer(p) {
    			return
    		}
    		if !top && !isPinned(p) {
    			panic(errorString(msg))
    		}
    		cgoCheckArg(it, p, it.Kind_&abi.KindDirectIface == 0, false, msg)
    	case abi.Slice:
    		st := (*slicetype)(unsafe.Pointer(t))
    		s := (*slice)(p)
    		p = s.array
    		if p == nil || !cgoIsGoPointer(p) {
    			return
    		}
    		if !top && !isPinned(p) {
    			panic(errorString(msg))
    		}
    		if !st.Elem.Pointers() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:16:47 UTC 2024
    - 24.2K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/types2/expr.go

    		}
    
    	case *syntax.KeyValueExpr:
    		// key:value expressions are handled in composite literals
    		check.error(e, InvalidSyntaxTree, "no key:value expected")
    		goto Error
    
    	case *syntax.ArrayType, *syntax.SliceType, *syntax.StructType, *syntax.FuncType,
    		*syntax.InterfaceType, *syntax.MapType, *syntax.ChanType:
    		x.mode = typexpr
    		x.typ = check.typ(e)
    		// Note: rawExpr (caller of exprInternal) will call check.recordTypeAndValue
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 02:09:54 UTC 2024
    - 51.7K bytes
    - Viewed (0)
  9. doc/go1.17_spec.html

    </p>
    
    <pre class="ebnf">
    Type      = TypeName | TypeLit | "(" Type ")" .
    TypeName  = identifier | QualifiedIdent .
    TypeLit   = ArrayType | StructType | PointerType | FunctionType | InterfaceType |
    	    SliceType | MapType | ChannelType .
    </pre>
    
    <p>
    The language <a href="#Predeclared_identifiers">predeclares</a> certain type names.
    Others are introduced with <a href="#Type_declarations">type declarations</a>.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 11 20:22:45 UTC 2024
    - 211.6K bytes
    - Viewed (0)
  10. doc/go_spec.html

    TypeName  = identifier | QualifiedIdent .
    TypeArgs  = "[" TypeList [ "," ] "]" .
    TypeList  = Type { "," Type } .
    TypeLit   = ArrayType | StructType | PointerType | FunctionType | InterfaceType |
                SliceType | MapType | ChannelType .
    </pre>
    
    <p>
    The language <a href="#Predeclared_identifiers">predeclares</a> certain type names.
    Others are introduced with <a href="#Type_declarations">type declarations</a>
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 21:07:21 UTC 2024
    - 281.5K bytes
    - Viewed (0)
Back to top