| 1 |
(component |
| 2 |
(type (;0;) |
| 3 |
(instance |
| 4 |
(type (;0;) (func (param "v" s32) (result s32))) |
| 5 |
(export (;0;) "bar" (func (type 0))) |
| 6 |
) |
| 7 |
) |
| 8 |
(import "test:test/test" (instance (;0;) (type 0))) |
| 9 |
(core module (;0;) |
| 10 |
(type (;0;) (func (param i32))) |
| 11 |
(import "wasi:cli/[email protected]" "get-environment" (func (;0;) (type 0))) |
| 12 |
(table (;0;) 1 funcref) |
| 13 |
(memory (;0;) 17) |
| 14 |
(global (;0;) (mut i32) i32.const 1048576) |
| 15 |
(global (;1;) i32 i32.const 1048592) |
| 16 |
(global (;2;) i32 i32.const 1) |
| 17 |
(global (;3;) (mut i32) i32.const 0) |
| 18 |
(global (;4;) i32 i32.const 1048624) |
| 19 |
(global (;5;) i32 i32.const 1) |
| 20 |
(global (;6;) i32 i32.const 1048624) |
| 21 |
(global (;7;) i32 i32.const 1) |
| 22 |
(global (;8;) (mut i32) i32.const 0) |
| 23 |
(global (;9;) (mut i32) i32.const 1048640) |
| 24 |
(global (;10;) (mut i32) i32.const 1114112) |
| 25 |
(export "__stack_pointer" (global 0)) |
| 26 |
(export "bar:memory_base" (global 1)) |
| 27 |
(export "bar:table_base" (global 2)) |
| 28 |
(export "bar:well" (global 3)) |
| 29 |
(export "c:memory_base" (global 4)) |
| 30 |
(export "c:table_base" (global 5)) |
| 31 |
(export "foo:memory_base" (global 6)) |
| 32 |
(export "foo:table_base" (global 7)) |
| 33 |
(export "foo:um" (global 8)) |
| 34 |
(export "__heap_base" (global 9)) |
| 35 |
(export "__heap_end" (global 10)) |
| 36 |
(export "wasi:cli/[email protected]:get-environment" (func 0)) |
| 37 |
(export "__indirect_function_table" (table 0)) |
| 38 |
(export "memory" (memory 0)) |
| 39 |
(@producers |
| 40 |
(processed-by "wit-component" "$CARGO_PKG_VERSION") |
| 41 |
) |
| 42 |
) |
| 43 |
(core module (;1;) |
| 44 |
(type (;0;) (func (param i32))) |
| 45 |
(export "get-environment" (func $get-environment)) |
| 46 |
(func $get-environment (;0;) (type 0) (param i32) |
| 47 |
unreachable |
| 48 |
) |
| 49 |
) |
| 50 |
(core module (;2;) |
| 51 |
(@dylink.0 |
| 52 |
(mem-info (memory 0 4)) |
| 53 |
) |
| 54 |
(type (;0;) (func)) |
| 55 |
(type (;1;) (func (param i32) (result i32))) |
| 56 |
(type (;2;) (func (param i32))) |
| 57 |
(import "wasi:cli/[email protected]" "get-environment" (func $get-environment (;0;) (type 2))) |
| 58 |
(import "GOT.mem" "__heap_base" (global $__heap_base (;0;) (mut i32))) |
| 59 |
(import "GOT.mem" "__heap_end" (global $__heap_end (;1;) (mut i32))) |
| 60 |
(global $heap (;2;) (mut i32) i32.const 0) |
| 61 |
(export "malloc" (func $malloc)) |
| 62 |
(export "abort" (func $abort)) |
| 63 |
(start $start) |
| 64 |
(func $start (;1;) (type 0) |
| 65 |
global.get $__heap_base |
| 66 |
global.set $heap |
| 67 |
) |
| 68 |
(func $malloc (;2;) (type 1) (param i32) (result i32) |
| 69 |
global.get $heap |
| 70 |
global.get $heap |
| 71 |
local.get 0 |
| 72 |
i32.add |
| 73 |
global.set $heap |
| 74 |
) |
| 75 |
(func $abort (;3;) (type 0) |
| 76 |
unreachable |
| 77 |
) |
| 78 |
) |
| 79 |
(core module (;3;) |
| 80 |
(@dylink.0 |
| 81 |
(mem-info (memory 4 4)) |
| 82 |
(needed "c") |
| 83 |
) |
| 84 |
(type (;0;) (func)) |
| 85 |
(type (;1;) (func (param i32) (result i32))) |
| 86 |
(import "env" "memory" (memory (;0;) 1)) |
| 87 |
(import "env" "__indirect_function_table" (table (;0;) 0 funcref)) |
| 88 |
(import "env" "__stack_pointer" (global $__stack_pointer (;0;) (mut i32))) |
| 89 |
(import "env" "__memory_base" (global $__memory_base (;1;) i32)) |
| 90 |
(import "env" "__table_base" (global $__table_base (;2;) i32)) |
| 91 |
(import "env" "malloc" (func $malloc (;0;) (type 1))) |
| 92 |
(import "env" "abort" (func $abort (;1;) (type 0))) |
| 93 |
(import "GOT.mem" "um" (global $um (;3;) (mut i32))) |
| 94 |
(import "test:test/test" "bar" (func $bar (;2;) (type 1))) |
| 95 |
(global (;4;) i32 i32.const 0) |
| 96 |
(export "__wasm_call_ctors" (func $__wasm_call_ctors)) |
| 97 |
(export "__wasm_apply_data_relocs" (func $__wasm_apply_data_relocs)) |
| 98 |
(export "foo" (func $foo)) |
| 99 |
(export "well" (global 4)) |
| 100 |
(func $__wasm_call_ctors (;3;) (type 0)) |
| 101 |
(func $__wasm_apply_data_relocs (;4;) (type 0)) |
| 102 |
(func $foo (;5;) (type 1) (param i32) (result i32) |
| 103 |
global.get $__stack_pointer |
| 104 |
i32.const 16 |
| 105 |
i32.sub |
| 106 |
global.set $__stack_pointer |
| 107 |
i32.const 4 |
| 108 |
call $malloc |
| 109 |
i32.const 0 |
| 110 |
i32.eq |
| 111 |
if ;; label = @1 |
| 112 |
call $abort |
| 113 |
unreachable |
| 114 |
end |
| 115 |
local.get 0 |
| 116 |
global.get $um |
| 117 |
i32.load offset=16 |
| 118 |
i32.add |
| 119 |
i32.const 42 |
| 120 |
i32.add |
| 121 |
call $bar |
| 122 |
global.get $__stack_pointer |
| 123 |
i32.const 16 |
| 124 |
i32.add |
| 125 |
global.set $__stack_pointer |
| 126 |
) |
| 127 |
(data $.data (;0;) (global.get $__memory_base) "\04\00\00\00") |
| 128 |
) |
| 129 |
(core module (;4;) |
| 130 |
(@dylink.0 |
| 131 |
(mem-info (memory 20 4)) |
| 132 |
(needed "foo") |
| 133 |
) |
| 134 |
(type (;0;) (func (param i32) (result i32))) |
| 135 |
(type (;1;) (func)) |
| 136 |
(import "env" "memory" (memory (;0;) 1)) |
| 137 |
(import "env" "__indirect_function_table" (table (;0;) 0 funcref)) |
| 138 |
(import "env" "__memory_base" (global $__memory_base (;0;) i32)) |
| 139 |
(import "env" "__table_base" (global $__table_base (;1;) i32)) |
| 140 |
(import "env" "foo" (func $foo (;0;) (type 0))) |
| 141 |
(import "GOT.mem" "well" (global $well (;2;) (mut i32))) |
| 142 |
(global (;3;) i32 i32.const 0) |
| 143 |
(export "__wasm_call_ctors" (func $__wasm_call_ctors)) |
| 144 |
(export "__wasm_apply_data_relocs" (func $__wasm_apply_data_relocs)) |
| 145 |
(export "test:test/test#bar" (func $bar)) |
| 146 |
(export "um" (global 3)) |
| 147 |
(func $__wasm_call_ctors (;1;) (type 1)) |
| 148 |
(func $__wasm_apply_data_relocs (;2;) (type 1)) |
| 149 |
(func $bar (;3;) (type 0) (param i32) (result i32) |
| 150 |
local.get 0 |
| 151 |
call $foo |
| 152 |
global.get $well |
| 153 |
i32.load |
| 154 |
i32.add |
| 155 |
) |
| 156 |
(data $.data (;0;) (global.get $__memory_base) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") |
| 157 |
) |
| 158 |
(core module (;5;) |
| 159 |
(type (;0;) (func)) |
| 160 |
(type (;1;) (func (param i32))) |
| 161 |
(import "env" "memory" (memory (;0;) 0)) |
| 162 |
(import "env" "__indirect_function_table" (table (;0;) 0 funcref)) |
| 163 |
(import "bar" "__wasm_apply_data_relocs" (func (;0;) (type 0))) |
| 164 |
(import "bar" "__wasm_call_ctors" (func (;1;) (type 0))) |
| 165 |
(import "env" "foo:memory_base" (global (;0;) i32)) |
| 166 |
(import "foo" "well" (global (;1;) i32)) |
| 167 |
(import "env" "bar:well" (global (;2;) (mut i32))) |
| 168 |
(import "foo" "__wasm_apply_data_relocs" (func (;2;) (type 0))) |
| 169 |
(import "foo" "__wasm_call_ctors" (func (;3;) (type 0))) |
| 170 |
(import "env" "bar:memory_base" (global (;3;) i32)) |
| 171 |
(import "bar" "um" (global (;4;) i32)) |
| 172 |
(import "env" "foo:um" (global (;5;) (mut i32))) |
| 173 |
(start 4) |
| 174 |
(elem (;0;) (i32.const 1) func) |
| 175 |
(elem (;1;) (i32.const 1) func) |
| 176 |
(func (;4;) (type 0) |
| 177 |
global.get 0 |
| 178 |
global.get 1 |
| 179 |
i32.add |
| 180 |
global.set 2 |
| 181 |
global.get 3 |
| 182 |
global.get 4 |
| 183 |
i32.add |
| 184 |
global.set 5 |
| 185 |
call 0 |
| 186 |
call 2 |
| 187 |
call 1 |
| 188 |
call 3 |
| 189 |
) |
| 190 |
(data (;0;) (i32.const 1048576) "\00\00\00\00\00\00\10\00") |
| 191 |
(@producers |
| 192 |
(processed-by "wit-component" "$CARGO_PKG_VERSION") |
| 193 |
) |
| 194 |
) |
| 195 |
(core module (;6;) |
| 196 |
(type (;0;) (func (param i32))) |
| 197 |
(table (;0;) 1 1 funcref) |
| 198 |
(export "0" (func $adapt-wasi:cli/[email protected])) |
| 199 |
(export "$imports" (table 0)) |
| 200 |
(func $adapt-wasi:cli/[email protected] (;0;) (type 0) (param i32) |
| 201 |
local.get 0 |
| 202 |
i32.const 0 |
| 203 |
call_indirect (type 0) |
| 204 |
) |
| 205 |
(@producers |
| 206 |
(processed-by "wit-component" "$CARGO_PKG_VERSION") |
| 207 |
) |
| 208 |
) |
| 209 |
(core module (;7;) |
| 210 |
(type (;0;) (func (param i32))) |
| 211 |
(import "" "0" (func (;0;) (type 0))) |
| 212 |
(import "" "$imports" (table (;0;) 1 1 funcref)) |
| 213 |
(elem (;0;) (i32.const 0) func 0) |
| 214 |
(@producers |
| 215 |
(processed-by "wit-component" "$CARGO_PKG_VERSION") |
| 216 |
) |
| 217 |
) |
| 218 |
(core instance (;0;) (instantiate 6)) |
| 219 |
(alias core export 0 "0" (core func (;0;))) |
| 220 |
(core instance (;1;) |
| 221 |
(export "get-environment" (func 0)) |
| 222 |
) |
| 223 |
(core instance (;2;) (instantiate 0 |
| 224 |
(with "wasi:cli/[email protected]" (instance 1)) |
| 225 |
) |
| 226 |
) |
| 227 |
(alias core export 2 "memory" (core memory (;0;))) |
| 228 |
(core instance (;3;) (instantiate 1)) |
| 229 |
(alias core export 2 "wasi:cli/[email protected]:get-environment" (core func (;1;))) |
| 230 |
(core instance (;4;) |
| 231 |
(export "get-environment" (func 1)) |
| 232 |
) |
| 233 |
(alias core export 2 "__heap_base" (core global (;0;))) |
| 234 |
(alias core export 2 "__heap_end" (core global (;1;))) |
| 235 |
(core instance (;5;) |
| 236 |
(export "__heap_base" (global 0)) |
| 237 |
(export "__heap_end" (global 1)) |
| 238 |
) |
| 239 |
(core instance (;6;) (instantiate 2 |
| 240 |
(with "wasi:cli/[email protected]" (instance 4)) |
| 241 |
(with "GOT.mem" (instance 5)) |
| 242 |
) |
| 243 |
) |
| 244 |
(alias core export 2 "__indirect_function_table" (core table (;0;))) |
| 245 |
(alias core export 2 "__stack_pointer" (core global (;2;))) |
| 246 |
(alias core export 2 "foo:memory_base" (core global (;3;))) |
| 247 |
(alias core export 2 "foo:table_base" (core global (;4;))) |
| 248 |
(alias core export 6 "malloc" (core func (;2;))) |
| 249 |
(alias core export 6 "abort" (core func (;3;))) |
| 250 |
(core instance (;7;) |
| 251 |
(export "memory" (memory 0)) |
| 252 |
(export "__indirect_function_table" (table 0)) |
| 253 |
(export "__stack_pointer" (global 2)) |
| 254 |
(export "__memory_base" (global 3)) |
| 255 |
(export "__table_base" (global 4)) |
| 256 |
(export "malloc" (func 2)) |
| 257 |
(export "abort" (func 3)) |
| 258 |
) |
| 259 |
(alias core export 2 "foo:um" (core global (;5;))) |
| 260 |
(core instance (;8;) |
| 261 |
(export "um" (global 5)) |
| 262 |
) |
| 263 |
(alias export 0 "bar" (func (;0;))) |
| 264 |
(core func (;4;) (canon lower (func 0))) |
| 265 |
(core instance (;9;) |
| 266 |
(export "bar" (func 4)) |
| 267 |
) |
| 268 |
(core instance (;10;) (instantiate 3 |
| 269 |
(with "env" (instance 7)) |
| 270 |
(with "GOT.mem" (instance 8)) |
| 271 |
(with "test:test/test" (instance 9)) |
| 272 |
) |
| 273 |
) |
| 274 |
(alias core export 2 "bar:memory_base" (core global (;6;))) |
| 275 |
(alias core export 2 "bar:table_base" (core global (;7;))) |
| 276 |
(alias core export 10 "foo" (core func (;5;))) |
| 277 |
(core instance (;11;) |
| 278 |
(export "memory" (memory 0)) |
| 279 |
(export "__indirect_function_table" (table 0)) |
| 280 |
(export "__memory_base" (global 6)) |
| 281 |
(export "__table_base" (global 7)) |
| 282 |
(export "foo" (func 5)) |
| 283 |
) |
| 284 |
(alias core export 2 "bar:well" (core global (;8;))) |
| 285 |
(core instance (;12;) |
| 286 |
(export "well" (global 8)) |
| 287 |
) |
| 288 |
(core instance (;13;) (instantiate 4 |
| 289 |
(with "env" (instance 11)) |
| 290 |
(with "GOT.mem" (instance 12)) |
| 291 |
) |
| 292 |
) |
| 293 |
(alias core export 0 "$imports" (core table (;1;))) |
| 294 |
(alias core export 3 "get-environment" (core func (;6;))) |
| 295 |
(core instance (;14;) |
| 296 |
(export "$imports" (table 1)) |
| 297 |
(export "0" (func 6)) |
| 298 |
) |
| 299 |
(core instance (;15;) (instantiate 7 |
| 300 |
(with "" (instance 14)) |
| 301 |
) |
| 302 |
) |
| 303 |
(core instance (;16;) (instantiate 5 |
| 304 |
(with "env" (instance 2)) |
| 305 |
(with "bar" (instance 13)) |
| 306 |
(with "foo" (instance 10)) |
| 307 |
) |
| 308 |
) |
| 309 |
(type (;1;) (func (param "v" s32) (result s32))) |
| 310 |
(alias core export 13 "test:test/test#bar" (core func (;7;))) |
| 311 |
(func (;1;) (type 1) (canon lift (core func 7))) |
| 312 |
(component (;0;) |
| 313 |
(type (;0;) (func (param "v" s32) (result s32))) |
| 314 |
(import "import-func-bar" (func (;0;) (type 0))) |
| 315 |
(type (;1;) (func (param "v" s32) (result s32))) |
| 316 |
(export (;1;) "bar" (func 0) (func (type 1))) |
| 317 |
) |
| 318 |
(instance (;1;) (instantiate 0 |
| 319 |
(with "import-func-bar" (func 1)) |
| 320 |
) |
| 321 |
) |
| 322 |
(export (;2;) "test:test/test" (instance 1)) |
| 323 |
(@producers |
| 324 |
(processed-by "wit-component" "$CARGO_PKG_VERSION") |
| 325 |
) |
| 326 |
) |