winch: Refactor the MacroAssembler
associated types
#6451
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit is a follow up to #6443, in which we discussed potentially having
PtrSize
andABI
as associated types to theMacroAssembler
trait.I considered having
PtrSize
associated to theABI
, but given the amount of ABI details needed at theMacroAssembler
level, I decided to go with the approach in this change.The chosen approach ended up cutting a decent amount of boilerplate from the
MacroAssembler
itself, but also from each of the touchpoints where theMacroAssembler
is used.This change also standardizes the signatures of the
ABI
trait. Some of them borrowed&self
and some didn't, but in practice, there's no need to have any of them borrow&self
.