Skip to content

Conversation

@kripken
Copy link
Member

@kripken kripken commented Mar 21, 2024

@kripken kripken requested a review from tlively March 21, 2024 00:16
Copy link
Member

@tlively tlively left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possibly worth doing this in the printer as well for consistency. WDYT?

@kripken
Copy link
Member Author

kripken commented Mar 21, 2024

Hmm, I think it might be best not to. We print an unreachable for text when we have to, like struct.get of a bottom type, because we have no way to print the immediate in a valid way. But here we can emit the instruction, which means it will round-trip, and more closely reflects the IR, which seems useful?

@tlively
Copy link
Member

tlively commented Mar 21, 2024

I guess so, but we'd have to fix it anyway if not for the spec bug that there is no annotation. I'm half tempted to say we should just add the annotation and pretend the spec bug has already been fixed, but that sounds like more trouble than it's worth.

Anyway, I don't feel too strongly about it.

@kripken
Copy link
Member Author

kripken commented Mar 21, 2024

I see. Yeah, if the spec gets changed we'd need to do this. Anyhow, for now this is just more convenient (both less work and more roundtripping).

@kripken kripken merged commit afcb387 into WebAssembly:main Mar 21, 2024
@kripken kripken deleted the string.unreach branch March 21, 2024 17:14
@gkdn gkdn mentioned this pull request Aug 31, 2024
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.

2 participants