Conversation
A strawman to address #9. Happy to change any of these. I checked with all (!) of the other proposals and with what SpiderMonkey and V8 implement to (attempt to) make sure I wasn't stompling other users.
Also update section number to not overlap with the tag section, and fix reftypes to not overlap with dataref/arrayref shorthands.
|
|
||
| instr ::= ... | ||
| | 0xfb 0x80 $mem:u32 ⇒ string.new_wtf8 $mem | ||
| | 0xfb 0x81 $mem:u32 ⇒ string.new_wtf16 $mem |
There was a problem hiding this comment.
I believe it's:
0xfb 0x80 $mem:u32 $len:u32 ⇒ string.new_wtf8 $mem $len
0xfb 0x81 $mem:u32 $len:u32 ⇒ string.new_wtf16 $mem $len
possibly in other instruction $len might be missing, unsure.
There was a problem hiding this comment.
Sorry, sloppy notation -- the $ prefix is meant to indicate an immediate. In this case it's which memory to use. The address and length are taken from the operand stack and aren't part of the encoding itself. Hope that is clear.
|
Need to update -- 0x65 is unavailable after https://github.com/WebAssembly/gc/pull/295/files. |
0x65 is unavailable after https://github.com/WebAssembly/gc/pull/295/files.
jakobkummerow
left a comment
There was a problem hiding this comment.
LGTM, with two comments:
• #11 (comment) suggested a more flexible spec for the literals section
• apparently prefixed opcode spaces should use LEB encoding rather than a custom split between two-byte opcode and "nested prefixes", which would force all opcode encodings suggested here to have three bytes instead. I'm fine with landing this as-is though, because changing these details later is easy.
A strawman to address #9. Happy to change any of these. I checked with all (!) of the other proposals and with what SpiderMonkey and V8 implement to (attempt to) make sure I wasn't stompling other users.