internal/{unify,simdgen}: replace NewDef with DefBuilder
NewDef requires two separate slices of field names and field values,
which is really awkward to use, both because you have to pair up the
i'th positions in two slices when reading code, and because it makes
it really awkward to conditionally add fields.
Fix this by replacing NewDef with a DefBuilder type that lets you add
field/value pairs one by one to build a Def.
No effect on generated godefs.
Change-Id: I75dfb6ac798585e717965ab9d5d0f1bc6a157aef
Reviewed-on: https://go-review.googlesource.com/c/arch/+/691337
Auto-Submit: Austin Clements <austin@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Junyang Shao <shaojunyang@google.com>
This repository holds machine architecture information used by the Go toolchain. The parts needed in the main Go repository are copied in.
This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://go.dev/doc/contribute.
The git repository is https://go.googlesource.com/arch.
The main issue tracker for the arch repository is located at https://go.dev/issues. Prefix your issue with “x/arch:” in the subject line, so it is easy to find.