|
| 1 | +(module |
| 2 | + (type $none_=>_none (func)) |
| 3 | + (type $i32_i32_=>_none (func (param i32 i32))) |
| 4 | + (type $i32_=>_none (func (param i32))) |
| 5 | + (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) |
| 6 | + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) |
| 7 | + (global $~argumentsLength (mut i32) (i32.const 0)) |
| 8 | + (global $~lib/memory/__data_end i32 (i32.const 44)) |
| 9 | + (global $~lib/memory/__stack_pointer (mut i32) (i32.const 16428)) |
| 10 | + (global $~lib/memory/__heap_base i32 (i32.const 16428)) |
| 11 | + (memory $0 1) |
| 12 | + (data (i32.const 12) "\1c\00\00\00\00\00\00\00\00\00\00\00\03\00\00\00\08\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00") |
| 13 | + (table $0 2 funcref) |
| 14 | + (elem $0 (i32.const 1) $start:return~anonymous|0) |
| 15 | + (export "testVoidReturn" (func $return/testVoidReturn)) |
| 16 | + (export "memory" (memory $0)) |
| 17 | + (export "testVoidReturnFunction" (func $export:return/testVoidReturnFunction)) |
| 18 | + (start $~start) |
| 19 | + (func $return/nop |
| 20 | + nop |
| 21 | + ) |
| 22 | + (func $start:return~anonymous|0 |
| 23 | + call $return/nop |
| 24 | + ) |
| 25 | + (func $return/testVoidReturnFunction (param $0 i32) (param $1 i32) |
| 26 | + local.get $0 |
| 27 | + if |
| 28 | + i32.const 0 |
| 29 | + global.set $~argumentsLength |
| 30 | + local.get $1 |
| 31 | + i32.load |
| 32 | + call_indirect $0 (type $none_=>_none) |
| 33 | + return |
| 34 | + end |
| 35 | + i32.const 0 |
| 36 | + global.set $~argumentsLength |
| 37 | + local.get $1 |
| 38 | + i32.load |
| 39 | + call_indirect $0 (type $none_=>_none) |
| 40 | + ) |
| 41 | + (func $return/testVoidReturn (param $0 i32) |
| 42 | + local.get $0 |
| 43 | + if |
| 44 | + call $return/nop |
| 45 | + return |
| 46 | + end |
| 47 | + call $return/nop |
| 48 | + ) |
| 49 | + (func $~start |
| 50 | + call $start:return |
| 51 | + ) |
| 52 | + (func $~stack_check |
| 53 | + global.get $~lib/memory/__stack_pointer |
| 54 | + global.get $~lib/memory/__data_end |
| 55 | + i32.lt_s |
| 56 | + if |
| 57 | + i32.const 16448 |
| 58 | + i32.const 16496 |
| 59 | + i32.const 1 |
| 60 | + i32.const 1 |
| 61 | + call $~lib/builtins/abort |
| 62 | + unreachable |
| 63 | + end |
| 64 | + ) |
| 65 | + (func $start:return |
| 66 | + (local $0 i32) |
| 67 | + global.get $~lib/memory/__stack_pointer |
| 68 | + i32.const 4 |
| 69 | + i32.sub |
| 70 | + global.set $~lib/memory/__stack_pointer |
| 71 | + call $~stack_check |
| 72 | + global.get $~lib/memory/__stack_pointer |
| 73 | + i32.const 0 |
| 74 | + i32.store |
| 75 | + i32.const 1 |
| 76 | + i32.const 32 |
| 77 | + local.set $0 |
| 78 | + global.get $~lib/memory/__stack_pointer |
| 79 | + local.get $0 |
| 80 | + i32.store |
| 81 | + local.get $0 |
| 82 | + call $return/testVoidReturnFunction |
| 83 | + global.get $~lib/memory/__stack_pointer |
| 84 | + i32.const 4 |
| 85 | + i32.add |
| 86 | + global.set $~lib/memory/__stack_pointer |
| 87 | + ) |
| 88 | + (func $export:return/testVoidReturnFunction (param $0 i32) (param $1 i32) |
| 89 | + global.get $~lib/memory/__stack_pointer |
| 90 | + i32.const 4 |
| 91 | + i32.sub |
| 92 | + global.set $~lib/memory/__stack_pointer |
| 93 | + call $~stack_check |
| 94 | + global.get $~lib/memory/__stack_pointer |
| 95 | + local.get $1 |
| 96 | + i32.store |
| 97 | + local.get $0 |
| 98 | + local.get $1 |
| 99 | + call $return/testVoidReturnFunction |
| 100 | + global.get $~lib/memory/__stack_pointer |
| 101 | + i32.const 4 |
| 102 | + i32.add |
| 103 | + global.set $~lib/memory/__stack_pointer |
| 104 | + ) |
| 105 | +) |
0 commit comments