blob: ef3114733314679be645b862dcc535bf78945e45 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
;;; TOOL: run-interp
(module
(func $f (param i32) (result i32)
(local i32)
loop $cont
local.get 1
i32.const 1
i32.add
local.set 1
local.get 1
local.get 0
i32.lt_s
br_if $cont
end
local.get 1
return)
(func (export "test1") (result i32)
i32.const 3
call $f)
(func (export "test2") (result i32)
i32.const 10
call $f))
(;; STDOUT ;;;
test1() => i32:3
test2() => i32:10
;;; STDOUT ;;)
|