wast-identifer-to-index transformation
Transforms some WAST semantics into WAT or WASM (actually specs semantics).
WAST allows you some handy shortcuts, like providing the identifier of a local instead of its index.
Example (refering to a param)
In
(func (param $name i32)
(get_local $name)
)
Out
(func (param i32)
(get_local 0)
)
Example (refering to a func)
In
(func $name)
(func
(call $name)
)
Out
;; first function in moduleinst.funcaddrs (index 0)
(func $name)
(func
(call 0)
)