]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: use internal/abi types in the compiler
authorKeith Randall <khr@golang.org>
Sun, 1 Oct 2023 17:02:39 +0000 (10:02 -0700)
committerGopher Robot <gobot@golang.org>
Mon, 9 Oct 2023 16:00:14 +0000 (16:00 +0000)
commit7fcc626b577ecd17f5b4a770671b265d3a850a49
tree581f4ec43075d63326ccfb52d5e4f3db3932e5cb
parent25e48765a4d267287630b63634c86b6a8ebb782e
cmd/compile: use internal/abi types in the compiler

It is tricky to use those types directly, because the layout of those
types in the compiler may not be the same as the layout of those
types in target binary (typically because of 32 vs 64 bit differences).

Instead, translate an internal/abi type into a cmd/compile/internal/types
type, which will then be laid out for the target machine.

Along with the translation, keep track of where all the bits of the
type are so we can reference their locations symbolically instead of
hardcoding them.

Change-Id: I2694c58968d4dc7ead63a2b1b29adfedd90ddd2e
Reviewed-on: https://go-review.googlesource.com/c/go/+/532155
Reviewed-by: David Chase <drchase@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Keith Randall <khr@google.com>
Reviewed-by: Keith Randall <khr@google.com>
src/cmd/compile/internal/gc/main.go
src/cmd/compile/internal/reflectdata/reflect.go
src/cmd/compile/internal/rttype/rttype.go [new file with mode: 0644]
src/cmd/compile/internal/walk/switch.go
src/internal/abi/compiletype.go
src/internal/abi/type.go