You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`table.init` text format has two forms:
- `table.init tableidx elemidx`
- `table.init elemidx` (`tableidx` is implicitly 0)
Because the optional `tableidx` is not the last (second) argument, we
have to parse one or two immediate arguments, and depending on how many
we parsed decide which one is `elemidx`.
Currently the code assumes first immediate argument is always a table,
which does not handle the second form.
Before this PR, `wasm-shell` fails to parse this functions in spec
tests:
https://github.com/WebAssembly/testsuite/blob/e05365077e13a1d86ffe77acfb1a835b7aa78422/bulk.wast#L207-L211
After the PR we're able to parse it, but we still can't parse the whole
file, because of other issues.
Error when parsing `bulk.wast`, before this PR:
```
209:6: error: expected elem index or identifier
```
After this PR:
```
250:33: error: unrecognized instruction
```
(The new error is about `elem.drop`, which we don't support yet, see
#7209)
0 commit comments