| 1 |
(component |
| 2 |
(core module (;0;) |
| 3 |
(type (;0;) (func (param i32 i32 i32 i32) (result i32))) |
| 4 |
(type (;1;) (func (param i32 i32 i32))) |
| 5 |
(memory (;0;) 1) |
| 6 |
(export "canonical_abi_realloc" (func 0)) |
| 7 |
(export "canonical_abi_free" (func 1)) |
| 8 |
(export "memory" (memory 0)) |
| 9 |
(func (;0;) (type 0) (param i32 i32 i32 i32) (result i32) |
| 10 |
unreachable |
| 11 |
) |
| 12 |
(func (;1;) (type 1) (param i32 i32 i32) |
| 13 |
unreachable |
| 14 |
) |
| 15 |
(@producers |
| 16 |
(processed-by "wit-component" "$CARGO_PKG_VERSION") |
| 17 |
(processed-by "my-fake-bindgen" "123.45") |
| 18 |
) |
| 19 |
) |
| 20 |
(core module (;1;) |
| 21 |
(type (;0;) (func (param i32 i32 i32 i32) (result i32))) |
| 22 |
(type (;1;) (func (param i32 i32 i32))) |
| 23 |
(type (;2;) (func (result i32))) |
| 24 |
(type (;3;) (func (param i32))) |
| 25 |
(type (;4;) (func)) |
| 26 |
(import "__main_module__" "canonical_abi_realloc" (func $realloc (;0;) (type 0))) |
| 27 |
(import "__main_module__" "canonical_abi_free" (func $free (;1;) (type 1))) |
| 28 |
(global $__stack_pointer (;0;) (mut i32) i32.const 0) |
| 29 |
(global $allocation_state (;1;) (mut i32) i32.const 0) |
| 30 |
(export "foo:foo/new#foo" (func 2)) |
| 31 |
(export "cabi_post_foo:foo/new#foo" (func 3)) |
| 32 |
(func (;2;) (type 2) (result i32) |
| 33 |
call $allocate_stack |
| 34 |
global.get $__stack_pointer |
| 35 |
global.get $allocation_state |
| 36 |
i32.const 0 |
| 37 |
i32.const 0 |
| 38 |
i32.const 0 |
| 39 |
i32.const 0 |
| 40 |
call $realloc |
| 41 |
unreachable |
| 42 |
) |
| 43 |
(func (;3;) (type 3) (param i32) |
| 44 |
call $allocate_stack |
| 45 |
i32.const 0 |
| 46 |
i32.const 0 |
| 47 |
i32.const 0 |
| 48 |
call $free |
| 49 |
unreachable |
| 50 |
) |
| 51 |
(func $allocate_stack (;4;) (type 4) |
| 52 |
global.get $allocation_state |
| 53 |
i32.const 0 |
| 54 |
i32.eq |
| 55 |
if ;; label = @1 |
| 56 |
i32.const 1 |
| 57 |
global.set $allocation_state |
| 58 |
i32.const 0 |
| 59 |
i32.const 0 |
| 60 |
i32.const 8 |
| 61 |
i32.const 65536 |
| 62 |
call $realloc |
| 63 |
i32.const 65536 |
| 64 |
i32.add |
| 65 |
global.set $__stack_pointer |
| 66 |
i32.const 2 |
| 67 |
global.set $allocation_state |
| 68 |
end |
| 69 |
) |
| 70 |
) |
| 71 |
(core instance (;0;) (instantiate 0)) |
| 72 |
(alias core export 0 "memory" (core memory (;0;))) |
| 73 |
(alias core export 0 "canonical_abi_realloc" (core func (;0;))) |
| 74 |
(alias core export 0 "canonical_abi_free" (core func (;1;))) |
| 75 |
(core instance (;1;) |
| 76 |
(export "canonical_abi_realloc" (func 0)) |
| 77 |
(export "canonical_abi_free" (func 1)) |
| 78 |
) |
| 79 |
(core instance (;2;) (instantiate 1 |
| 80 |
(with "__main_module__" (instance 1)) |
| 81 |
) |
| 82 |
) |
| 83 |
(type (;0;) (func (result string))) |
| 84 |
(alias core export 2 "foo:foo/new#foo" (core func (;2;))) |
| 85 |
(alias core export 2 "cabi_post_foo:foo/new#foo" (core func (;3;))) |
| 86 |
(func (;0;) (type 0) (canon lift (core func 2) (memory 0) string-encoding=utf8 (post-return 3))) |
| 87 |
(component (;0;) |
| 88 |
(type (;0;) (func (result string))) |
| 89 |
(import "import-func-foo" (func (;0;) (type 0))) |
| 90 |
(type (;1;) (func (result string))) |
| 91 |
(export (;1;) "foo" (func 0) (func (type 1))) |
| 92 |
) |
| 93 |
(instance (;0;) (instantiate 0 |
| 94 |
(with "import-func-foo" (func 0)) |
| 95 |
) |
| 96 |
) |
| 97 |
(export (;1;) "foo:foo/new" (instance 0)) |
| 98 |
(@producers |
| 99 |
(processed-by "wit-component" "$CARGO_PKG_VERSION") |
| 100 |
) |
| 101 |
) |