WasmTextToBinary: call_indirect syntax is not compatible
Categories
(Core :: JavaScript: WebAssembly, defect, P3)
Tracking
()
People
(Reporter: volker.berlin, Unassigned, Mentored)
References
Details
(Keywords: good-first-bug)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36
Steps to reproduce:
If I run the follow test code from WABT https://github.com/WebAssembly/wabt/blob/master/test/dump/callindirect.txt
(module
(type $t (func (param i32)))
(func $f (type $t)
i32.const 0
i32.const 0
call_indirect (type $t)
)
(table anyfunc (elem $f))
)
Actual results:
I receive the error: SyntaxError: wasm text error: parsing wasm text at 6:19
A workaround is to use: call_indirect $t
But this syntax is not compatible with wabt. The type
keyword is required because it used its own namespace.
Expected results:
I need one syntax that work with WABT and WasmTextToBinary.
Updated•6 years ago
|
Updated•6 years ago
|
Comment 1•6 years ago
|
||
The patch on bug 1571998 implements support for (type X)
but not inline function type declarations, while keeping support for the old syntax. For inline function type declarations to work, we'd have to plumb the module through to EmitCallIndirect
which is a bit gnarly.
So after that lands, the following problems remain:
- no inline function type declaration support
- the legacy syntax should be removed
Updated•5 years ago
|
Reporter | ||
Updated•5 years ago
|
Description
•