Support since v8.0
int factorial(int n) {
if (n == 0)
return 1;
else
return n * factorial(n - 1);
}
get_local 0
i64.eqz
if (result i64)
i64.const 1
else
get_local 0
get_local 0
i64.const 1
i64.sub
call 0
i64.mul
end
20 00
50
04 7E
42 01
05
20 00
20 00
42 01
7D
10 00
7E
0B
(module
(import "math" "exp" (func $exp (param f64) (result f64)))
(func (export "doubleExp") (param $0 f64) (result f64)
(f64.mul
(call $exp
(get_local $0)
)
(f64.const 2)
)
)
)