]> Cypherpunks repositories - gostls13.git/commit
cmd/compile/internal/ssagen: provide intrinsicBuilders
authorJoel Sing <joel@sing.id.au>
Sat, 3 Aug 2024 18:45:14 +0000 (04:45 +1000)
committerGopher Robot <gobot@golang.org>
Tue, 27 Aug 2024 14:27:25 +0000 (14:27 +0000)
commitdff15aa610f44a414069e6123fe1e16e7d65065c
tree7a1be56d8c7233436eefdae01b0888c8002a9d08
parent5d82dbb59c97c8b5b9c5e5e8ef1b1e60d9f11563
cmd/compile/internal/ssagen: provide intrinsicBuilders

Create an intrinsicBuilders type that has functions for adding and
looking up intrinsics. This makes the implementation more self contained,
readable and testable. Additionally, pass an *intrinsicBuildConfig to
initIntrinsics to improve testability without needing to modify package
level variables.

Change-Id: I0ee0a19c192dd6da9f1c5f1c29b98a3ad8161fe2
Reviewed-on: https://go-review.googlesource.com/c/go/+/605478
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Keith Randall <khr@google.com>
Auto-Submit: Joel Sing <joel@sing.id.au>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/ssagen/intrinsics.go
src/cmd/compile/internal/ssagen/intrinsics_test.go
src/cmd/compile/internal/ssagen/ssa.go
src/internal/buildcfg/cfg.go