Files
wasmtime/cranelift/codegen/meta
Jamey Sharp f877141668 cranelift-meta: Don't let-bind operand definitions (#5969)
We've adopted this pattern in Cranelift's instruction definitions where
we let-bind some calls to `Operand::new` and then later use them in one
or more calls to `Inst::new`.

That pattern has two problems:
- It puts the type of each operand somewhere potentially far removed
  from the instruction in which it's used.
- We let-bind the same name for many different operands, compounding the
  first problem by making it harder to find _which_ definition is used.

So instead this commit removes all let-bindings for operand definitions
and constructs a new `Operand` every time.

Constructing an `Operand` at every use means we duplicate some
documentation strings, but not all that many of them as it turns out.

I've left the let-bound type-sets alone, so those are currently still
shared across many instructions. They have some of the same problems and
should be reviewed as well.
2023-03-09 17:24:19 +00:00
..
2023-03-06 15:08:16 +00:00

This crate contains the metaprogram used by cranelift-codegen. It's not useful on its own.