Closed Bug 1556779 Opened 6 years ago Closed 5 years ago

WasmTextToBinary: call_indirect syntax is not compatible

Categories

(Core :: JavaScript: WebAssembly, defect, P3)

defect

Tracking

()

VERIFIED DUPLICATE of bug 1612534

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.

Blocks: 1527871
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P3
Mentor: lhansen
Keywords: good-first-bug

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:

  1. no inline function type declaration support
  2. the legacy syntax should be removed
Depends on: 1612534
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.