mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
The part of the tag stored in the payload can currently be up to 8 bytes in size (though only the 'low' 4 bytes can be non-zero). On little-endian machines this doesn't matter, we can always just store up to 4 bytes and zero the remaining payload bytes. On big- endian systems however we may need to store more than 4 bytes. The store implementation now mirrors the runtime code that fetches the tag on big-endian systems which already treats the payload tag as an 8 byte integer. This is a spot fix but longer term we might want to consider refactoring this code to reduce the number of differences between big- and little-endian implementations. For example, we could centralise some of the copying logic and/or make the payload tag a 4 byte field on all platforms.
7.0 KiB
7.0 KiB