- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 10 for TypeHash (0.39 sec)
-
src/runtime/alg.go
// typehash, but we want to report the topmost type in // the error text (e.g. in a struct with a field of slice type // we want to report the struct, not the slice). panic(errorString("hash of unhashable type " + toRType(t).string())) } if isDirectIface(t) { return c1 * typehash(t, unsafe.Pointer(&a.data), h^c0) } else { return c1 * typehash(t, a.data, h^c0) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 29 17:58:53 UTC 2024 - 13.6K bytes - Viewed (0) -
src/runtime/type.go
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/cmd/compile/internal/types2/typestring.go
w.string(f.pkg.Path()) w.string(" */ ") } if tag := t.Tag(i); tag != "" { w.byte(' ') // TODO(gri) If tag contains blanks, replacing them with '#' // in Context.TypeHash may produce another tag // accidentally. w.string(strconv.Quote(tag)) } } w.byte('}') case *Pointer: w.byte('*') w.typ(t.base) case *Tuple:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 03:01:18 UTC 2024 - 12.2K bytes - Viewed (0) -
src/go/types/typestring.go
w.string(f.pkg.Path()) w.string(" */ ") } if tag := t.Tag(i); tag != "" { w.byte(' ') // TODO(gri) If tag contains blanks, replacing them with '#' // in Context.TypeHash may produce another tag // accidentally. w.string(strconv.Quote(tag)) } } w.byte('}') case *Pointer: w.byte('*') w.typ(t.base) case *Tuple:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 03:01:18 UTC 2024 - 12.3K bytes - Viewed (0) -
src/cmd/compile/internal/types2/stmt.go
err.report() continue L } } seen[T] = e if x != nil && T != nil { check.typeAssertion(e, x, T, true) } } return } // TODO(gri) Once we are certain that typeHash is correct in all situations, use this version of caseTypes instead. // (Currently it may be possible that different types have identical names and import paths due to ImporterFrom.) //
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 30.7K bytes - Viewed (0) -
src/go/types/stmt.go
err.report() continue L } } seen[T] = e if x != nil && T != nil { check.typeAssertion(e, x, T, true) } } return } // TODO(gri) Once we are certain that typeHash is correct in all situations, use this version of caseTypes instead. // (Currently it may be possible that different types have identical names and import paths due to ImporterFrom.) //
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 30.6K bytes - Viewed (0) -
src/runtime/map_test.go
} type canString int func (c canString) String() string { return fmt.Sprintf("%d", int(c)) } func TestMapInterfaceKey(t *testing.T) { // Test all the special cases in runtime.typehash. type GrabBag struct { f32 float32 f64 float64 c64 complex64 c128 complex128 s string i0 any i1 interface { String() string } a [4]string }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 33.5K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/rewrite.go
} } return false } func fixed32(c *Config, sym Sym, off int64) int32 { lsym := sym.(*obj.LSym) if ti, ok := (*lsym.Extra).(*obj.TypeInfo); ok { if off == 2*c.PtrSize { return int32(types.TypeHash(ti.Type.(*types.Type))) } } base.Fatalf("fixed32 data not known for %s:%d", sym, off) return 0 } // isFixedSym returns true if the contents of sym at the given offset
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jun 07 19:02:52 UTC 2024 - 64.2K bytes - Viewed (0) -
src/reflect/type.go
mt.Key = ktyp mt.Elem = etyp mt.Bucket = bucketOf(ktyp, etyp) mt.Hasher = func(p unsafe.Pointer, seed uintptr) uintptr { return typehash(ktyp, p, seed) } mt.Flags = 0 if ktyp.Size_ > abi.MapMaxKeyBytes { mt.KeySize = uint8(goarch.PtrSize) mt.Flags |= 1 // indirect key } else { mt.KeySize = uint8(ktyp.Size_) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 29 17:58:53 UTC 2024 - 85.5K bytes - Viewed (0) -
src/reflect/value.go
// typedarrayclear zeroes the value at ptr of an array of elemType, // only clears len elem. // //go:noescape func typedarrayclear(elemType *abi.Type, ptr unsafe.Pointer, len int) //go:noescape func typehash(t *abi.Type, p unsafe.Pointer, h uintptr) uintptr func verifyNotInHeapPtr(p uintptr) bool //go:noescape func growslice(t *abi.Type, old unsafeheader.Slice, num int) unsafeheader.Slice //go:noescape
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 21:17:41 UTC 2024 - 119.9K bytes - Viewed (0)