Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 25 for UnsafePointer (0.44 sec)

  1. src/go/types/signature.go

    					break
    				}
    				var cause string
    				switch u := T.under().(type) {
    				case *Basic:
    					// unsafe.Pointer is treated like a regular pointer
    					if u.kind == UnsafePointer {
    						cause = "unsafe.Pointer"
    					}
    				case *Pointer, *Interface:
    					cause = "pointer or interface type"
    				case *TypeParam:
    					// The underlying type of a receiver base type cannot be a
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 29 22:06:18 UTC 2024
    - 13K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/types2/builtins.go

    		check.verifyVersionf(call.Fun, go1_17, "unsafe.Add")
    
    		check.assignment(x, Typ[UnsafePointer], "argument to unsafe.Add")
    		if x.mode == invalid {
    			return
    		}
    
    		y := args[1]
    		if !check.isValidIndex(y, InvalidUnsafeAdd, "length", true) {
    			return
    		}
    
    		x.mode = value
    		x.typ = Typ[UnsafePointer]
    		if check.recordTypes() {
    			check.recordBuiltinType(call.Fun, makeSig(x.typ, x.typ, y.typ))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 27.1K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/types2/check_test.go

    // For accessing unexported fields.
    func boolFieldAddr(conf *Config, name string) *bool {
    	v := reflect.Indirect(reflect.ValueOf(conf))
    	return (*bool)(v.FieldByName(name).Addr().UnsafePointer())
    }
    
    // TestManual is for manual testing of a package - either provided
    // as a list of filenames belonging to the package, or a directory
    // name containing the package files - after the test arguments
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 19:45:33 UTC 2024
    - 13.8K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/types2/signature.go

    					break
    				}
    				var cause string
    				switch u := T.under().(type) {
    				case *Basic:
    					// unsafe.Pointer is treated like a regular pointer
    					if u.kind == UnsafePointer {
    						cause = "unsafe.Pointer"
    					}
    				case *Pointer, *Interface:
    					cause = "pointer or interface type"
    				case *TypeParam:
    					// The underlying type of a receiver base type cannot be a
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 21:33:05 UTC 2024
    - 12.6K bytes
    - Viewed (0)
  5. src/runtime/type.go

    		pkgpathv := rv.nameOff(uv.PkgPath).Name()
    		if pkgpatht != pkgpathv {
    			return false
    		}
    	}
    	if abi.Bool <= kind && kind <= abi.Complex128 {
    		return true
    	}
    	switch kind {
    	case abi.String, abi.UnsafePointer:
    		return true
    	case abi.Array:
    		at := (*arraytype)(unsafe.Pointer(t))
    		av := (*arraytype)(unsafe.Pointer(v))
    		return typesEqual(at.Elem, av.Elem, seen) && at.Len == av.Len
    	case abi.Chan:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:17:26 UTC 2024
    - 12.7K bytes
    - Viewed (0)
  6. src/reflect/abi.go

    //
    // This method along with the assign* methods represent the
    // complete register-assignment algorithm for the Go ABI.
    func (a *abiSeq) regAssign(t *abi.Type, offset uintptr) bool {
    	switch Kind(t.Kind()) {
    	case UnsafePointer, Pointer, Chan, Map, Func:
    		return a.assignIntN(offset, t.Size(), 1, 0b1)
    	case Bool, Int, Uint, Int8, Uint8, Int16, Uint16, Int32, Uint32, Uintptr:
    		return a.assignIntN(offset, t.Size(), 1, 0b0)
    	case Int64, Uint64:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 17:08:32 UTC 2024
    - 15K bytes
    - Viewed (0)
  7. src/runtime/syscall_windows.go

    	switch k := t.Kind_ & abi.KindMask; k {
    	case abi.Bool, abi.Int, abi.Int8, abi.Int16, abi.Int32, abi.Uint, abi.Uint8, abi.Uint16, abi.Uint32, abi.Uintptr, abi.Pointer, abi.UnsafePointer:
    		// Assign a register for all these types.
    		return p.assignReg(t.Size_, offset)
    	case abi.Int64, abi.Uint64:
    		// Only register-assign if the registers are big enough.
    		if goarch.PtrSize == 8 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 20:12:46 UTC 2024
    - 16.6K bytes
    - Viewed (0)
  8. src/internal/reflectlite/type.go

    		return false
    	}
    
    	// Non-composite types of equal kind have same underlying type
    	// (the predefined instance of the type).
    	if abi.Bool <= kind && kind <= abi.Complex128 || kind == abi.String || kind == abi.UnsafePointer {
    		return true
    	}
    
    	// Composite types.
    	switch kind {
    	case abi.Array:
    		return T.Len() == V.Len() && haveIdenticalType(T.Elem(), V.Elem(), cmpTags)
    
    	case abi.Chan:
    		// Special case:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 17:01:54 UTC 2024
    - 16.2K bytes
    - Viewed (0)
  9. src/encoding/json/encode.go

    		return
    	}
    	if e.ptrLevel++; e.ptrLevel > startDetectingCyclesAfter {
    		// We're a large number of nested ptrEncoder.encode calls deep;
    		// start checking if we've run into a pointer cycle.
    		ptr := v.UnsafePointer()
    		if _, ok := e.ptrSeen[ptr]; ok {
    			e.error(&UnsupportedValueError{v, fmt.Sprintf("encountered a cycle via %s", v.Type())})
    		}
    		e.ptrSeen[ptr] = struct{}{}
    		defer delete(e.ptrSeen, ptr)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:18:55 UTC 2024
    - 36.2K bytes
    - Viewed (0)
  10. src/go/types/predicates.go

    		}
    		// fallthrough
    	}
    	return false
    }
    
    // hasNil reports whether type t includes the nil value.
    func hasNil(t Type) bool {
    	switch u := under(t).(type) {
    	case *Basic:
    		return u.kind == UnsafePointer
    	case *Slice, *Pointer, *Signature, *Map, *Chan:
    		return true
    	case *Interface:
    		return !isTypeParam(t) || u.typeSet().underIs(func(u Type) bool {
    			return u != nil && hasNil(u)
    		})
    	}
    	return false
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:01:18 UTC 2024
    - 17.6K bytes
    - Viewed (0)
Back to top