Files
cli/vendor/wit-component/tests/components/link-duplicate-symbols/component.wat

136 lines
4.7 KiB
Plaintext

(component
(type $ty-test:test/test (;0;)
(instance
(type (;0;) (func (param "v" s32) (result s32)))
(export (;0;) "foo" (func (type 0)))
)
)
(import "test:test/test" (instance $test:test/test (;0;) (type $ty-test:test/test)))
(core module $main (;0;)
(type (;0;) (func (param i32) (result i32)))
(table (;0;) 2 funcref)
(memory (;0;) 17)
(global (;0;) (mut i32) i32.const 1048576)
(global (;1;) (mut i32) i32.const 1048576)
(global (;2;) (mut i32) i32.const 0)
(global (;3;) i32 i32.const 1048592)
(global (;4;) i32 i32.const 1)
(global (;5;) i32 i32.const 1048592)
(global (;6;) i32 i32.const 1)
(global (;7;) (mut i32) i32.const 1048592)
(global (;8;) (mut i32) i32.const 1114112)
(export "__stack_pointer" (global 0))
(export "__stack_high" (global 1))
(export "__stack_low" (global 2))
(export "bar:memory_base" (global 3))
(export "bar:table_base" (global 4))
(export "foo:memory_base" (global 5))
(export "foo:table_base" (global 6))
(export "__heap_base" (global 7))
(export "__heap_end" (global 8))
(export "foo" (func 0))
(export "__indirect_function_table" (table 0))
(export "memory" (memory 0))
(func (;0;) (type 0) (param i32) (result i32)
local.get 0
i32.const 1
call_indirect (type 0)
)
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
)
(core module $bar (;1;)
(@dylink.0
(mem-info (memory 0 4))
(needed "foo")
)
(type (;0;) (func (param i32) (result i32)))
(import "env" "foo" (func $import_foo (;0;) (type 0)))
(export "bar" (func $bar))
(export "foo" (func $bar))
(func $bar (;1;) (type 0) (param i32) (result i32)
unreachable
)
)
(core module $foo (;2;)
(@dylink.0
(mem-info (memory 0 4))
(needed "bar")
)
(type (;0;) (func (param i32) (result i32)))
(import "test:test/test" "foo" (func $import_foo (;0;) (type 0)))
(import "env" "foo" (func $import_foo2 (;1;) (type 0)))
(import "env" "bar" (func $import_bar (;2;) (type 0)))
(export "test:test/test#foo" (func $foo))
(export "foo" (func $foo))
(func $foo (;3;) (type 0) (param i32) (result i32)
unreachable
)
)
(core module $__init (;3;)
(type (;0;) (func))
(type (;1;) (func (param i32)))
(type (;2;) (func (param i32) (result i32)))
(import "env" "memory" (memory (;0;) 0))
(import "env" "__indirect_function_table" (table (;0;) 0 funcref))
(import "bar" "foo" (func (;0;) (type 2)))
(start 1)
(elem (;0;) (i32.const 1) func)
(elem (;1;) (i32.const 1) func 0)
(func (;1;) (type 0))
(data (;0;) (i32.const 1048576) "\00\00\00\00\00\00\10\00")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
)
(core instance $main (;0;) (instantiate $main))
(alias core export $main "memory" (core memory $memory (;0;)))
(alias core export $main "foo" (core func $foo (;0;)))
(core instance $env (;1;)
(export "foo" (func $foo))
)
(core instance $bar (;2;) (instantiate $bar
(with "env" (instance $env))
)
)
(alias export $test:test/test "foo" (func $foo (;0;)))
(core func $"#core-func1 foo" (@name "foo") (;1;) (canon lower (func $foo)))
(core instance $test:test/test (;3;)
(export "foo" (func $"#core-func1 foo"))
)
(alias core export $bar "foo" (core func $"#core-func2 foo" (@name "foo") (;2;)))
(alias core export $bar "bar" (core func $bar (;3;)))
(core instance $"#core-instance4 env" (@name "env") (;4;)
(export "foo" (func $"#core-func2 foo"))
(export "bar" (func $bar))
)
(core instance $foo (;5;) (instantiate $foo
(with "test:test/test" (instance $test:test/test))
(with "env" (instance $"#core-instance4 env"))
)
)
(core instance $__init (;6;) (instantiate $__init
(with "env" (instance $main))
(with "bar" (instance $bar))
)
)
(type (;1;) (func (param "v" s32) (result s32)))
(alias core export $foo "test:test/test#foo" (core func $test:test/test#foo (;4;)))
(func $"#func1 foo" (@name "foo") (;1;) (type 1) (canon lift (core func $test:test/test#foo)))
(component $test:test/test-shim-component (;0;)
(type (;0;) (func (param "v" s32) (result s32)))
(import "import-func-foo" (func (;0;) (type 0)))
(type (;1;) (func (param "v" s32) (result s32)))
(export (;1;) "foo" (func 0) (func (type 1)))
)
(instance $test:test/test-shim-instance (;1;) (instantiate $test:test/test-shim-component
(with "import-func-foo" (func $"#func1 foo"))
)
)
(export $"#instance2 test:test/test" (@name "test:test/test") (;2;) "test:test/test" (instance $test:test/test-shim-instance))
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
)