| 1 |
(component |
| 2 |
(type (;0;) (func)) |
| 3 |
(import "foo1" (func (;0;) (type 0))) |
| 4 |
(type (;1;) (func (result string))) |
| 5 |
(import "bar" (func (;1;) (type 1))) |
| 6 |
(core module (;0;) |
| 7 |
(type (;0;) (func (param i32 i32 i32 i32) (result i32))) |
| 8 |
(import "foo" "cabi_realloc" (func (;0;) (type 0))) |
| 9 |
(table (;0;) 1 funcref) |
| 10 |
(memory (;0;) 17) |
| 11 |
(global (;0;) (mut i32) i32.const 1048576) |
| 12 |
(global (;1;) i32 i32.const 1048592) |
| 13 |
(global (;2;) i32 i32.const 1) |
| 14 |
(global (;3;) i32 i32.const 1048592) |
| 15 |
(global (;4;) i32 i32.const 1) |
| 16 |
(global (;5;) (mut i32) i32.const 1048608) |
| 17 |
(global (;6;) (mut i32) i32.const 1114112) |
| 18 |
(export "cabi_realloc" (func 0)) |
| 19 |
(export "__stack_pointer" (global 0)) |
| 20 |
(export "c:memory_base" (global 1)) |
| 21 |
(export "c:table_base" (global 2)) |
| 22 |
(export "foo:memory_base" (global 3)) |
| 23 |
(export "foo:table_base" (global 4)) |
| 24 |
(export "__heap_base" (global 5)) |
| 25 |
(export "__heap_end" (global 6)) |
| 26 |
(export "__indirect_function_table" (table 0)) |
| 27 |
(export "memory" (memory 0)) |
| 28 |
(@producers |
| 29 |
(processed-by "wit-component" "$CARGO_PKG_VERSION") |
| 30 |
) |
| 31 |
) |
| 32 |
(core module (;1;) |
| 33 |
(@dylink.0 |
| 34 |
(mem-info (memory 0 4)) |
| 35 |
) |
| 36 |
(type (;0;) (func)) |
| 37 |
(type (;1;) (func (param i32) (result i32))) |
| 38 |
(import "GOT.mem" "__heap_base" (global $__heap_base (;0;) (mut i32))) |
| 39 |
(import "GOT.mem" "__heap_end" (global $__heap_end (;1;) (mut i32))) |
| 40 |
(global $heap (;2;) (mut i32) i32.const 0) |
| 41 |
(export "malloc" (func $malloc)) |
| 42 |
(export "abort" (func $abort)) |
| 43 |
(start $start) |
| 44 |
(func $start (;0;) (type 0) |
| 45 |
global.get $__heap_base |
| 46 |
global.set $heap |
| 47 |
) |
| 48 |
(func $malloc (;1;) (type 1) (param i32) (result i32) |
| 49 |
global.get $heap |
| 50 |
global.get $heap |
| 51 |
local.get 0 |
| 52 |
i32.add |
| 53 |
global.set $heap |
| 54 |
) |
| 55 |
(func $abort (;2;) (type 0) |
| 56 |
unreachable |
| 57 |
) |
| 58 |
) |
| 59 |
(core module (;2;) |
| 60 |
(@dylink.0 |
| 61 |
(mem-info (memory 4 4)) |
| 62 |
(needed "c") |
| 63 |
) |
| 64 |
(type (;0;) (func)) |
| 65 |
(type (;1;) (func (param i32))) |
| 66 |
(type (;2;) (func (param i32 i32) (result i32))) |
| 67 |
(type (;3;) (func (param i32 i32 i32 i32) (result i32))) |
| 68 |
(import "env" "memory" (memory (;0;) 1)) |
| 69 |
(import "$root" "foo1" (func (;0;) (type 0))) |
| 70 |
(import "$root" "bar" (func (;1;) (type 1))) |
| 71 |
(export "baz" (func 2)) |
| 72 |
(export "foo2" (func 3)) |
| 73 |
(export "cabi_post_foo2" (func 4)) |
| 74 |
(export "cabi_realloc" (func 5)) |
| 75 |
(export "cabi_import_realloc" (func 6)) |
| 76 |
(export "cabi_export_realloc" (func 7)) |
| 77 |
(func (;2;) (type 0)) |
| 78 |
(func (;3;) (type 2) (param i32 i32) (result i32) |
| 79 |
unreachable |
| 80 |
) |
| 81 |
(func (;4;) (type 1) (param i32) |
| 82 |
unreachable |
| 83 |
) |
| 84 |
(func (;5;) (type 3) (param i32 i32 i32 i32) (result i32) |
| 85 |
unreachable |
| 86 |
) |
| 87 |
(func (;6;) (type 3) (param i32 i32 i32 i32) (result i32) |
| 88 |
unreachable |
| 89 |
) |
| 90 |
(func (;7;) (type 3) (param i32 i32 i32 i32) (result i32) |
| 91 |
unreachable |
| 92 |
) |
| 93 |
) |
| 94 |
(core module (;3;) |
| 95 |
(type (;0;) (func)) |
| 96 |
(type (;1;) (func (param i32))) |
| 97 |
(import "env" "memory" (memory (;0;) 0)) |
| 98 |
(import "env" "__indirect_function_table" (table (;0;) 0 funcref)) |
| 99 |
(start 0) |
| 100 |
(elem (;0;) (i32.const 1) func) |
| 101 |
(elem (;1;) (i32.const 1) func) |
| 102 |
(func (;0;) (type 0)) |
| 103 |
(data (;0;) (i32.const 1048576) "\00\00\00\00\00\00\10\00") |
| 104 |
(@producers |
| 105 |
(processed-by "wit-component" "$CARGO_PKG_VERSION") |
| 106 |
) |
| 107 |
) |
| 108 |
(core module (;4;) |
| 109 |
(type (;0;) (func (param i32 i32 i32 i32) (result i32))) |
| 110 |
(type (;1;) (func (param i32))) |
| 111 |
(table (;0;) 2 2 funcref) |
| 112 |
(export "0" (func $adapt-foo-cabi_realloc)) |
| 113 |
(export "1" (func $indirect-$root-bar)) |
| 114 |
(export "$imports" (table 0)) |
| 115 |
(func $adapt-foo-cabi_realloc (;0;) (type 0) (param i32 i32 i32 i32) (result i32) |
| 116 |
local.get 0 |
| 117 |
local.get 1 |
| 118 |
local.get 2 |
| 119 |
local.get 3 |
| 120 |
i32.const 0 |
| 121 |
call_indirect (type 0) |
| 122 |
) |
| 123 |
(func $indirect-$root-bar (;1;) (type 1) (param i32) |
| 124 |
local.get 0 |
| 125 |
i32.const 1 |
| 126 |
call_indirect (type 1) |
| 127 |
) |
| 128 |
(@producers |
| 129 |
(processed-by "wit-component" "$CARGO_PKG_VERSION") |
| 130 |
) |
| 131 |
) |
| 132 |
(core module (;5;) |
| 133 |
(type (;0;) (func (param i32 i32 i32 i32) (result i32))) |
| 134 |
(type (;1;) (func (param i32))) |
| 135 |
(import "" "0" (func (;0;) (type 0))) |
| 136 |
(import "" "1" (func (;1;) (type 1))) |
| 137 |
(import "" "$imports" (table (;0;) 2 2 funcref)) |
| 138 |
(elem (;0;) (i32.const 0) func 0 1) |
| 139 |
(@producers |
| 140 |
(processed-by "wit-component" "$CARGO_PKG_VERSION") |
| 141 |
) |
| 142 |
) |
| 143 |
(core instance (;0;) (instantiate 4)) |
| 144 |
(alias core export 0 "0" (core func (;0;))) |
| 145 |
(core instance (;1;) |
| 146 |
(export "cabi_realloc" (func 0)) |
| 147 |
) |
| 148 |
(core instance (;2;) (instantiate 0 |
| 149 |
(with "foo" (instance 1)) |
| 150 |
) |
| 151 |
) |
| 152 |
(alias core export 2 "memory" (core memory (;0;))) |
| 153 |
(alias core export 2 "__heap_base" (core global (;0;))) |
| 154 |
(alias core export 2 "__heap_end" (core global (;1;))) |
| 155 |
(core instance (;3;) |
| 156 |
(export "__heap_base" (global 0)) |
| 157 |
(export "__heap_end" (global 1)) |
| 158 |
) |
| 159 |
(core instance (;4;) (instantiate 1 |
| 160 |
(with "GOT.mem" (instance 3)) |
| 161 |
) |
| 162 |
) |
| 163 |
(core instance (;5;) |
| 164 |
(export "memory" (memory 0)) |
| 165 |
) |
| 166 |
(core func (;1;) (canon lower (func 0))) |
| 167 |
(alias core export 0 "1" (core func (;2;))) |
| 168 |
(core instance (;6;) |
| 169 |
(export "foo1" (func 1)) |
| 170 |
(export "bar" (func 2)) |
| 171 |
) |
| 172 |
(core instance (;7;) (instantiate 2 |
| 173 |
(with "env" (instance 5)) |
| 174 |
(with "$root" (instance 6)) |
| 175 |
) |
| 176 |
) |
| 177 |
(alias core export 0 "$imports" (core table (;0;))) |
| 178 |
(alias core export 7 "cabi_realloc" (core func (;3;))) |
| 179 |
(alias core export 7 "cabi_import_realloc" (core func (;4;))) |
| 180 |
(core func (;5;) (canon lower (func 1) (memory 0) (realloc 4) string-encoding=utf8)) |
| 181 |
(core instance (;8;) |
| 182 |
(export "$imports" (table 0)) |
| 183 |
(export "0" (func 3)) |
| 184 |
(export "1" (func 5)) |
| 185 |
) |
| 186 |
(core instance (;9;) (instantiate 5 |
| 187 |
(with "" (instance 8)) |
| 188 |
) |
| 189 |
) |
| 190 |
(core instance (;10;) (instantiate 3 |
| 191 |
(with "env" (instance 2)) |
| 192 |
) |
| 193 |
) |
| 194 |
(alias core export 7 "baz" (core func (;6;))) |
| 195 |
(alias core export 7 "cabi_export_realloc" (core func (;7;))) |
| 196 |
(func (;2;) (type 0) (canon lift (core func 6))) |
| 197 |
(export (;3;) "baz" (func 2)) |
| 198 |
(type (;2;) (list u8)) |
| 199 |
(type (;3;) (option 2)) |
| 200 |
(type (;4;) (func (param "x" string) (result 3))) |
| 201 |
(alias core export 7 "foo2" (core func (;8;))) |
| 202 |
(alias core export 7 "cabi_post_foo2" (core func (;9;))) |
| 203 |
(func (;4;) (type 4) (canon lift (core func 8) (memory 0) (realloc 7) string-encoding=utf8 (post-return 9))) |
| 204 |
(export (;5;) "foo2" (func 4)) |
| 205 |
(@producers |
| 206 |
(processed-by "wit-component" "$CARGO_PKG_VERSION") |
| 207 |
) |
| 208 |
) |