Skip to content
This repository was archived by the owner on Apr 25, 2025. It is now read-only.

Sync instruction mnemonics #242

Closed
wants to merge 1 commit into from
Closed

Sync instruction mnemonics #242

wants to merge 1 commit into from

Conversation

rossberg
Copy link
Member

This updates the MVP overview to match the instruction names actually used in the test suite and interpreter.

@jakobkummerow
Copy link
Contributor

It's true that I originally suggested these renamings for simplification, back when it seemed like those would be the only .new instructions.

But nowadays we have subgroup consensus to officially evaluate nominal types, which requires a second set of RTT-less .new instructions. For disassembly/debugging purposes, both opcodes (e.g. 0xfb01 and 0xfb07 could be translated to the same human-readable struct.get, but since the .wat format is also used as an assembler/interchange format by current toolchains (e.g. produced by J2CL, consumed by Binaryen), it is useful to have an unambiguous distinction between the two instructions in the text format.

So at this time, to accomplish our goals, we should maintain the distinction between:

  • struct.new, 0xfb07, without RTT on the stack, with static type
  • struct.new_with_rtt, 0xfb01, with RTT on the stack, possibly without static type (Remove redundant typeidx on gc instructions #241)
    (And analogously for new_default and array.new*.)

In the future, we will decide whether both instructions will be kept or only one of them; in the latter case, whichever is kept can be renamed to just struct.new for simplicity.

@tlively
Copy link
Member

tlively commented Jul 21, 2022

Closing this because it looks like it is no longer applicable.

@tlively tlively closed this Jul 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants