This reevaluates the places where `std::size_t` should be replaced by
`std::uint64_t` in the conversions, it also appends `std::` prefixes to
them where it's possible in preparation to the eventual `import std`
transition.
The original non-position based distribution (`considerRegisters`)
algorithm had a whole lot of problems preventing effective padding
support because it was written with only registers in mind.
As such, it was easier to rewrite the whole logic from scratch over
trying to fix it incrementally.
This makes the conversions more robust, since everything can rely on
the same tools for filling in missing registers and ordering them based
on the ABI requirements.
This brings the layout-side handling of these closer to the way they are
handled when converting the function.
The biggest change is the fact that now the return value location can
also be passed as the first stack argument.
This was a necessary change because without at least basic shortcuts
introduced here, we get a whole lot of failures downstream due to
layouts of such functions and the layout production is by design not
allowed to fail.
When a shadow return value location argument is distributed, it is
shifting all the other argument indices by one. This was not taken into
the account previously. This commit fixes the indices.
It also makes it so the arguments `SizeOnStack` does not account for
padding. This is useful for some layout users.
This reorders the algorithms, so that the return values are handled
before the arguments. It also improves the wordind and extends
the comments annotating the function.
Moreover, it takes advantage of the `TypeBucket` to decouple type
management from the "raw" binary.
The algorithm was looking for any array qualifier on a zero-sized
type, which led to some valid types being discarded in the case
when there was a pointer qualifier in-between.
`void a[100]` is not a valid type, while void *a[100]` is.