]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: clean up eq and hash implementations
authorKeith Randall <khr@golang.org>
Fri, 5 Dec 2025 22:20:00 +0000 (14:20 -0800)
committerKeith Randall <khr@golang.org>
Sat, 24 Jan 2026 04:58:20 +0000 (20:58 -0800)
commitcca64d0f5ccc6ae88d36ee5ef388b8617d4d425d
tree64c9533e2f25aaf7c2aea192babaceae07ca8f9a
parent0da8979210de8749306ddd8b49710d5594bb75c4
cmd/compile: clean up eq and hash implementations

Use unsafe.Pointer instead of *any as the argument type.
Now that we're using signatures, we don't have exact types so we
might as well use unsafe.Pointer everywhere.

Simplify hash function choice a bit.

Change-Id: If1a07091031c4b966fde3a1d66295a04fd5a838c
Reviewed-on: https://go-review.googlesource.com/c/go/+/727501
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@google.com>
src/cmd/compile/internal/compare/compare.go
src/cmd/compile/internal/reflectdata/alg.go
src/cmd/compile/internal/typecheck/_builtin/runtime.go
src/cmd/compile/internal/typecheck/builtin.go
src/cmd/compile/internal/walk/compare.go