spec icon indicating copy to clipboard operation
spec copied to clipboard

Inconsistent text and binary formats for `table.init`

Open osa1 opened this issue 7 months ago • 0 comments

Binary format reference: https://webassembly.github.io/spec/core/binary/instructions.html#table-instructions Text format reference: https://webassembly.github.io/spec/core/text/instructions.html#table-instructions

In the binary format elemidx comes before optional tableidx.

In the text format the optional tableidx comes first.

Should they be consistent? Is it possible to change the text format now?

Relatedly, I'm wondering where in the spec we mention that the table indices in table instructions are optional, with 0 as the default?

osa1 avatar Jun 13 '25 08:06 osa1