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 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
|
(module
(type $FUNCSIG$v (func))
(type $1 (func (result i32)))
(type $FUNCSIG$vi (func (param i32)))
(import "env" "func" (func $import))
(import "env" "log_execution" (func $log_execution (param i32)))
(func $nopp (; 2 ;) (type $FUNCSIG$v)
(call $log_execution
(i32.const 0)
)
(nop)
)
(func $intt (; 3 ;) (type $1) (result i32)
(call $log_execution
(i32.const 1)
)
(i32.const 10)
)
(func $workk (; 4 ;) (type $FUNCSIG$v)
(call $log_execution
(i32.const 2)
)
(block
(if
(i32.const 0)
(nop)
)
(drop
(i32.const 1)
)
)
)
(func $loops (; 5 ;) (type $FUNCSIG$v)
(call $log_execution
(i32.const 6)
)
(block
(loop $x
(call $log_execution
(i32.const 3)
)
(block
(call $loops)
(br $x)
)
)
(if
(call $intt)
(loop $y
(call $log_execution
(i32.const 4)
)
(call $loops)
)
)
(loop $loop-in
(call $log_execution
(i32.const 5)
)
(block
(drop
(i32.const 10)
)
(drop
(i32.const 20)
)
(drop
(i32.const 30)
)
)
)
)
)
(func $loops-similar (; 6 ;) (type $FUNCSIG$v)
(call $log_execution
(i32.const 8)
)
(loop $x
(call $log_execution
(i32.const 7)
)
(block
(call $loops)
(br $x)
)
)
)
)
|