|
| 1 | +(module |
| 2 | + (type $i32_=>_i32 (func (param i32) (result i32))) |
| 3 | + (type $none_=>_none (func)) |
| 4 | + (type $i32_=>_none (func (param i32))) |
| 5 | + (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) |
| 6 | + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) |
| 7 | + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) |
| 8 | + (memory $0 1) |
| 9 | + (data (i32.const 16) "&\00\00\00\01\00\00\00\01\00\00\00&\00\00\00c\00l\00a\00s\00s\00-\00i\00m\00p\00l\00e\00m\00e\00n\00t\00s\00.\00t\00s\00") |
| 10 | + (table $0 1 funcref) |
| 11 | + (global $~lib/rt/stub/startOffset (mut i32) (i32.const 0)) |
| 12 | + (global $~lib/rt/stub/offset (mut i32) (i32.const 0)) |
| 13 | + (global $class-implements/a (mut i32) (i32.const 0)) |
| 14 | + (global $class-implements/c (mut i32) (i32.const 0)) |
| 15 | + (global $~lib/heap/__heap_base i32 (i32.const 72)) |
| 16 | + (global $class-implements/A i32 (i32.const 3)) |
| 17 | + (global $class-implements/C i32 (i32.const 5)) |
| 18 | + (export "memory" (memory $0)) |
| 19 | + (export "A" (global $class-implements/A)) |
| 20 | + (export "A#foo" (func $class-implements/A#foo)) |
| 21 | + (export "A#constructor" (func $class-implements/A#constructor)) |
| 22 | + (export "C" (global $class-implements/C)) |
| 23 | + (export "C#foo" (func $class-implements/C#foo)) |
| 24 | + (start $~start) |
| 25 | + (func $~lib/rt/stub/maybeGrowMemory (param $0 i32) |
| 26 | + (local $1 i32) |
| 27 | + (local $2 i32) |
| 28 | + (local $3 i32) |
| 29 | + (local $4 i32) |
| 30 | + (local $5 i32) |
| 31 | + memory.size |
| 32 | + local.set $1 |
| 33 | + local.get $1 |
| 34 | + i32.const 16 |
| 35 | + i32.shl |
| 36 | + local.set $2 |
| 37 | + local.get $0 |
| 38 | + local.get $2 |
| 39 | + i32.gt_u |
| 40 | + if |
| 41 | + local.get $0 |
| 42 | + local.get $2 |
| 43 | + i32.sub |
| 44 | + i32.const 65535 |
| 45 | + i32.add |
| 46 | + i32.const 65535 |
| 47 | + i32.const -1 |
| 48 | + i32.xor |
| 49 | + i32.and |
| 50 | + i32.const 16 |
| 51 | + i32.shr_u |
| 52 | + local.set $3 |
| 53 | + local.get $1 |
| 54 | + local.tee $4 |
| 55 | + local.get $3 |
| 56 | + local.tee $5 |
| 57 | + local.get $4 |
| 58 | + local.get $5 |
| 59 | + i32.gt_s |
| 60 | + select |
| 61 | + local.set $4 |
| 62 | + local.get $4 |
| 63 | + memory.grow |
| 64 | + i32.const 0 |
| 65 | + i32.lt_s |
| 66 | + if |
| 67 | + local.get $3 |
| 68 | + memory.grow |
| 69 | + i32.const 0 |
| 70 | + i32.lt_s |
| 71 | + if |
| 72 | + unreachable |
| 73 | + end |
| 74 | + end |
| 75 | + end |
| 76 | + local.get $0 |
| 77 | + global.set $~lib/rt/stub/offset |
| 78 | + ) |
| 79 | + (func $~lib/rt/stub/__alloc (param $0 i32) (param $1 i32) (result i32) |
| 80 | + (local $2 i32) |
| 81 | + (local $3 i32) |
| 82 | + (local $4 i32) |
| 83 | + (local $5 i32) |
| 84 | + (local $6 i32) |
| 85 | + local.get $0 |
| 86 | + i32.const 1073741808 |
| 87 | + i32.gt_u |
| 88 | + if |
| 89 | + unreachable |
| 90 | + end |
| 91 | + global.get $~lib/rt/stub/offset |
| 92 | + i32.const 16 |
| 93 | + i32.add |
| 94 | + local.set $2 |
| 95 | + local.get $0 |
| 96 | + i32.const 15 |
| 97 | + i32.add |
| 98 | + i32.const 15 |
| 99 | + i32.const -1 |
| 100 | + i32.xor |
| 101 | + i32.and |
| 102 | + local.tee $3 |
| 103 | + i32.const 16 |
| 104 | + local.tee $4 |
| 105 | + local.get $3 |
| 106 | + local.get $4 |
| 107 | + i32.gt_u |
| 108 | + select |
| 109 | + local.set $5 |
| 110 | + local.get $2 |
| 111 | + local.get $5 |
| 112 | + i32.add |
| 113 | + call $~lib/rt/stub/maybeGrowMemory |
| 114 | + local.get $2 |
| 115 | + i32.const 16 |
| 116 | + i32.sub |
| 117 | + local.set $6 |
| 118 | + local.get $6 |
| 119 | + local.get $5 |
| 120 | + i32.store |
| 121 | + i32.const 1 |
| 122 | + drop |
| 123 | + local.get $6 |
| 124 | + i32.const 1 |
| 125 | + i32.store offset=4 |
| 126 | + local.get $6 |
| 127 | + local.get $1 |
| 128 | + i32.store offset=8 |
| 129 | + local.get $6 |
| 130 | + local.get $0 |
| 131 | + i32.store offset=12 |
| 132 | + local.get $2 |
| 133 | + ) |
| 134 | + (func $~lib/rt/stub/__retain (param $0 i32) (result i32) |
| 135 | + local.get $0 |
| 136 | + ) |
| 137 | + (func $class-implements/A#constructor (param $0 i32) (result i32) |
| 138 | + local.get $0 |
| 139 | + i32.eqz |
| 140 | + if |
| 141 | + i32.const 0 |
| 142 | + i32.const 3 |
| 143 | + call $~lib/rt/stub/__alloc |
| 144 | + call $~lib/rt/stub/__retain |
| 145 | + local.set $0 |
| 146 | + end |
| 147 | + local.get $0 |
| 148 | + ) |
| 149 | + (func $class-implements/A#foo (param $0 i32) (result i32) |
| 150 | + i32.const 1 |
| 151 | + ) |
| 152 | + (func $class-implements/B#constructor (param $0 i32) (result i32) |
| 153 | + local.get $0 |
| 154 | + i32.eqz |
| 155 | + if |
| 156 | + i32.const 0 |
| 157 | + i32.const 6 |
| 158 | + call $~lib/rt/stub/__alloc |
| 159 | + call $~lib/rt/stub/__retain |
| 160 | + local.set $0 |
| 161 | + end |
| 162 | + local.get $0 |
| 163 | + ) |
| 164 | + (func $class-implements/C#constructor (param $0 i32) (result i32) |
| 165 | + local.get $0 |
| 166 | + i32.eqz |
| 167 | + if |
| 168 | + i32.const 0 |
| 169 | + i32.const 5 |
| 170 | + call $~lib/rt/stub/__alloc |
| 171 | + call $~lib/rt/stub/__retain |
| 172 | + local.set $0 |
| 173 | + end |
| 174 | + local.get $0 |
| 175 | + call $class-implements/B#constructor |
| 176 | + local.set $0 |
| 177 | + local.get $0 |
| 178 | + ) |
| 179 | + (func $class-implements/C#foo (param $0 i32) (result i32) |
| 180 | + i32.const 2 |
| 181 | + ) |
| 182 | + (func $start:class-implements |
| 183 | + global.get $~lib/heap/__heap_base |
| 184 | + i32.const 15 |
| 185 | + i32.add |
| 186 | + i32.const 15 |
| 187 | + i32.const -1 |
| 188 | + i32.xor |
| 189 | + i32.and |
| 190 | + global.set $~lib/rt/stub/startOffset |
| 191 | + global.get $~lib/rt/stub/startOffset |
| 192 | + global.set $~lib/rt/stub/offset |
| 193 | + i32.const 0 |
| 194 | + call $class-implements/A#constructor |
| 195 | + global.set $class-implements/a |
| 196 | + global.get $class-implements/a |
| 197 | + call $class-implements/A#foo |
| 198 | + i32.const 1 |
| 199 | + i32.eq |
| 200 | + i32.eqz |
| 201 | + if |
| 202 | + i32.const 0 |
| 203 | + i32.const 32 |
| 204 | + i32.const 10 |
| 205 | + i32.const 1 |
| 206 | + call $~lib/builtins/abort |
| 207 | + unreachable |
| 208 | + end |
| 209 | + i32.const 0 |
| 210 | + call $class-implements/C#constructor |
| 211 | + global.set $class-implements/c |
| 212 | + global.get $class-implements/c |
| 213 | + call $class-implements/C#foo |
| 214 | + i32.const 2 |
| 215 | + i32.eq |
| 216 | + i32.eqz |
| 217 | + if |
| 218 | + i32.const 0 |
| 219 | + i32.const 32 |
| 220 | + i32.const 20 |
| 221 | + i32.const 1 |
| 222 | + call $~lib/builtins/abort |
| 223 | + unreachable |
| 224 | + end |
| 225 | + ) |
| 226 | + (func $~start |
| 227 | + call $start:class-implements |
| 228 | + ) |
| 229 | +) |
0 commit comments