- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 59 for UnsafePointer (0.2 sec)
-
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) -
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) -
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) -
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) -
test/escape_reflect.go
func int1(x int) int { v := reflect.ValueOf(x) // ERROR "x does not escape" return int(v.Int()) } func ptr(x *int) *int { // ERROR "leaking param: x to result ~r0 level=0" v := reflect.ValueOf(x) return (*int)(v.UnsafePointer()) } func bytes1(x []byte) byte { // ERROR "x does not escape" v := reflect.ValueOf(x) // ERROR "x does not escape" return v.Bytes()[0] }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 08 18:50:24 UTC 2023 - 13.1K bytes - Viewed (0) -
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) -
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) -
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) -
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) -
src/runtime/debuglog.go
return l } l.w.byte(debugLogPtr) if x == nil { l.w.uvarint(0) } else { v := efaceOf(&x) switch v._type.Kind_ & abi.KindMask { case abi.Chan, abi.Func, abi.Map, abi.Pointer, abi.UnsafePointer: l.w.uvarint(uint64(uintptr(v.data))) default: throw("not a pointer type") } } return l } //go:nosplit func (l *dlogger) s(x string) *dlogger { if !dlogEnabled {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 15:10:48 UTC 2024 - 18.3K bytes - Viewed (0)