Skip to content

[NFC] Simplify externref literal representation#8765

Open
tlively wants to merge 1 commit into
mainfrom
fix-externref-representation
Open

[NFC] Simplify externref literal representation#8765
tlively wants to merge 1 commit into
mainfrom
fix-externref-representation

Conversation

@tlively
Copy link
Copy Markdown
Member

@tlively tlively commented May 22, 2026

Instead of using a complex bit-packing scheme to represent externref payloads and differentiate them from externalized internal references, simply store the payload in the GCData. Externalized internal references are also stored in the GCData, but can be differentiated from externref payloads because the latter have type i32 and the former are always reference types.

Besides being complex, the bit packing scheme was also incorrect on big-endian architectures.

Instead of using a complex bit-packing scheme to represent externref payloads and differentiate them from externalized internal references, simply store the payload in the GCData. Externalized internal references are also stored in the GCData, but can be differentiated from externref payloads because the latter have type i32 and the former are always reference types.

Besides being complex, the bit packing scheme was also incorrect on big-endian architectures.
@tlively tlively requested a review from a team as a code owner May 22, 2026 23:56
@tlively tlively requested review from kripken and removed request for a team May 22, 2026 23:56
@tlively tlively changed the title Simplify externref literal representation [NFC] Simplify externref literal representation May 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant