Closed stephentyrone closed 3 years ago
@swift-ci please test
@swift-ci please test
Fiiine. I was really pleased with my cleverness here.
A point in favor of simplification here is that even on little endian systems there can still be an alignment mismatch between this and the non-DoubleWidth
types of the same width.
This doesn't really add anything that we need; it changes the in-memory layout, but that's effectively an implementation detail. We might as well simply pick one and simplify things.
This does mean that DoubleWidth types have a "weird" layout on big endian systems, but that doesn't really cause any problems for anything. This would be a problem if we sunk these types into the standard library and wanted to bridge them to/from
__int128_t
and friends, because the representation wouldn't match. It's also trivial to revert this change, however, since it doesn't actually intrude into any operations, so let's keep things simple for now.