call
call
calls a function, return_call
being the tail-call version of it. call_indirect
calls a function in a table with the return_call_indirect
tail-call version as well.
Examples
Calling the greet
function imported from JavaScript using call
:
Try it
Calculating factorial for a number using return_call
and logging the result using the exported fac
function:
Try it
Syntax
wasm
call $greet
Instruction | Binary opcode |
---|---|
call |
0x10 |
call_indirect |
0x11 |
return_call |
0x12 |
return_call_indirect |
0x13 |