Let (store, tableaddr) be table_alloc(store, type, ref).
Core specification:
table_alloc(store, tabletype) : (store, tableaddr, ref)
...
table_alloc(S, tt, r) = (S', a) (if alloctable(S, tt, r) = S', a)
Clearly, it seems like the ref in the result 3-tuple should be moved to be the third parameter instead, given the mismatch between the definition and its header.
While reading over some of the Editor's Draft regarding tables at https://webassembly.github.io/spec/js-api/#tables, I noticed that it links to the core specification
table_alloc
https://webassembly.github.io/spec/core/appendix/embedding.html#embed-table-alloc.Editor's Draft:
Core specification:
Clearly, it seems like the
ref
in the result 3-tuple should be moved to be the third parameter instead, given the mismatch between the definition and its header.