151 lines
6.0 KiB
Plaintext
151 lines
6.0 KiB
Plaintext
|
|
(component
|
||
|
|
(core module $main (;0;)
|
||
|
|
(table (;0;) 1 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 "__indirect_function_table" (table 0))
|
||
|
|
(export "memory" (memory 0))
|
||
|
|
(@producers
|
||
|
|
(processed-by "wit-component" "$CARGO_PKG_VERSION")
|
||
|
|
)
|
||
|
|
)
|
||
|
|
(core module $foo (;1;)
|
||
|
|
(@dylink.0
|
||
|
|
(mem-info (memory 0 4))
|
||
|
|
)
|
||
|
|
(type (;0;) (func (param i32) (result i32)))
|
||
|
|
(export "test:test/foo#[constructor]x" (func $x_ctor))
|
||
|
|
(export "test:test/foo#[method]x.get" (func $x_get))
|
||
|
|
(func $foo (;0;) (type 0) (param i32) (result i32)
|
||
|
|
unreachable
|
||
|
|
)
|
||
|
|
(func $x_ctor (;1;) (type 0) (param i32) (result i32)
|
||
|
|
unreachable
|
||
|
|
)
|
||
|
|
(func $x_get (;2;) (type 0) (param i32) (result i32)
|
||
|
|
unreachable
|
||
|
|
)
|
||
|
|
)
|
||
|
|
(core module $bar (;2;)
|
||
|
|
(@dylink.0
|
||
|
|
(mem-info (memory 0 4))
|
||
|
|
(needed "foo")
|
||
|
|
)
|
||
|
|
(type (;0;) (func (param i32) (result i32)))
|
||
|
|
(export "test:test/bar#[constructor]x" (func $x_ctor))
|
||
|
|
(export "test:test/bar#[method]x.get" (func $x_get))
|
||
|
|
(func $x_ctor (;0;) (type 0) (param i32) (result i32)
|
||
|
|
unreachable
|
||
|
|
)
|
||
|
|
(func $x_get (;1;) (type 0) (param i32) (result i32)
|
||
|
|
unreachable
|
||
|
|
)
|
||
|
|
)
|
||
|
|
(core module $__init (;3;)
|
||
|
|
(type (;0;) (func))
|
||
|
|
(type (;1;) (func (param i32)))
|
||
|
|
(import "env" "memory" (memory (;0;) 0))
|
||
|
|
(import "env" "__indirect_function_table" (table (;0;) 0 funcref))
|
||
|
|
(start 0)
|
||
|
|
(elem (;0;) (i32.const 1) func)
|
||
|
|
(elem (;1;) (i32.const 1) func)
|
||
|
|
(func (;0;) (type 0))
|
||
|
|
(data (;0;) (i32.const 1048576) "\00\00\00\00\00\00\10\00")
|
||
|
|
(@producers
|
||
|
|
(processed-by "wit-component" "$CARGO_PKG_VERSION")
|
||
|
|
)
|
||
|
|
)
|
||
|
|
(type $x (;0;) (resource (rep i32)))
|
||
|
|
(type $"#type1 x" (@name "x") (;1;) (resource (rep i32)))
|
||
|
|
(core instance $main (;0;) (instantiate $main))
|
||
|
|
(alias core export $main "memory" (core memory $memory (;0;)))
|
||
|
|
(core instance $foo (;1;) (instantiate $foo))
|
||
|
|
(core instance $bar (;2;) (instantiate $bar))
|
||
|
|
(core instance $__init (;3;) (instantiate $__init
|
||
|
|
(with "env" (instance $main))
|
||
|
|
)
|
||
|
|
)
|
||
|
|
(type (;2;) (own $x))
|
||
|
|
(type (;3;) (func (param "v" u32) (result 2)))
|
||
|
|
(alias core export $foo "test:test/foo#[constructor]x" (core func $"test:test/foo#[constructor]x" (;0;)))
|
||
|
|
(func $"[constructor]x" (;0;) (type 3) (canon lift (core func $"test:test/foo#[constructor]x")))
|
||
|
|
(type (;4;) (borrow $x))
|
||
|
|
(type (;5;) (func (param "self" 4) (result u32)))
|
||
|
|
(alias core export $foo "test:test/foo#[method]x.get" (core func $"test:test/foo#[method]x.get" (;1;)))
|
||
|
|
(func $"[method]x.get" (;1;) (type 5) (canon lift (core func $"test:test/foo#[method]x.get")))
|
||
|
|
(component $test:test/foo-shim-component (;0;)
|
||
|
|
(import "import-type-x" (type (;0;) (sub resource)))
|
||
|
|
(type (;1;) (own 0))
|
||
|
|
(type (;2;) (func (param "v" u32) (result 1)))
|
||
|
|
(import "import-constructor-x" (func (;0;) (type 2)))
|
||
|
|
(type (;3;) (borrow 0))
|
||
|
|
(type (;4;) (func (param "self" 3) (result u32)))
|
||
|
|
(import "import-method-x-get" (func (;1;) (type 4)))
|
||
|
|
(export (;5;) "x" (type 0))
|
||
|
|
(type (;6;) (own 5))
|
||
|
|
(type (;7;) (func (param "v" u32) (result 6)))
|
||
|
|
(export (;2;) "[constructor]x" (func 0) (func (type 7)))
|
||
|
|
(type (;8;) (borrow 5))
|
||
|
|
(type (;9;) (func (param "self" 8) (result u32)))
|
||
|
|
(export (;3;) "[method]x.get" (func 1) (func (type 9)))
|
||
|
|
)
|
||
|
|
(instance $test:test/foo-shim-instance (;0;) (instantiate $test:test/foo-shim-component
|
||
|
|
(with "import-constructor-x" (func $"[constructor]x"))
|
||
|
|
(with "import-method-x-get" (func $"[method]x.get"))
|
||
|
|
(with "import-type-x" (type $x))
|
||
|
|
)
|
||
|
|
)
|
||
|
|
(export $test:test/foo (;1;) "test:test/foo" (instance $test:test/foo-shim-instance))
|
||
|
|
(type (;6;) (own $"#type1 x"))
|
||
|
|
(type (;7;) (func (param "v" u32) (result 6)))
|
||
|
|
(alias core export $bar "test:test/bar#[constructor]x" (core func $"test:test/bar#[constructor]x" (;2;)))
|
||
|
|
(func $"#func2 [constructor]x" (@name "[constructor]x") (;2;) (type 7) (canon lift (core func $"test:test/bar#[constructor]x")))
|
||
|
|
(type (;8;) (borrow $"#type1 x"))
|
||
|
|
(type (;9;) (func (param "self" 8) (result u32)))
|
||
|
|
(alias core export $bar "test:test/bar#[method]x.get" (core func $"test:test/bar#[method]x.get" (;3;)))
|
||
|
|
(func $"#func3 [method]x.get" (@name "[method]x.get") (;3;) (type 9) (canon lift (core func $"test:test/bar#[method]x.get")))
|
||
|
|
(component $test:test/bar-shim-component (;1;)
|
||
|
|
(import "import-type-x" (type (;0;) (sub resource)))
|
||
|
|
(type (;1;) (own 0))
|
||
|
|
(type (;2;) (func (param "v" u32) (result 1)))
|
||
|
|
(import "import-constructor-x" (func (;0;) (type 2)))
|
||
|
|
(type (;3;) (borrow 0))
|
||
|
|
(type (;4;) (func (param "self" 3) (result u32)))
|
||
|
|
(import "import-method-x-get" (func (;1;) (type 4)))
|
||
|
|
(export (;5;) "x" (type 0))
|
||
|
|
(type (;6;) (own 5))
|
||
|
|
(type (;7;) (func (param "v" u32) (result 6)))
|
||
|
|
(export (;2;) "[constructor]x" (func 0) (func (type 7)))
|
||
|
|
(type (;8;) (borrow 5))
|
||
|
|
(type (;9;) (func (param "self" 8) (result u32)))
|
||
|
|
(export (;3;) "[method]x.get" (func 1) (func (type 9)))
|
||
|
|
)
|
||
|
|
(instance $test:test/bar-shim-instance (;2;) (instantiate $test:test/bar-shim-component
|
||
|
|
(with "import-constructor-x" (func $"#func2 [constructor]x"))
|
||
|
|
(with "import-method-x-get" (func $"#func3 [method]x.get"))
|
||
|
|
(with "import-type-x" (type $"#type1 x"))
|
||
|
|
)
|
||
|
|
)
|
||
|
|
(export $test:test/bar (;3;) "test:test/bar" (instance $test:test/bar-shim-instance))
|
||
|
|
(@producers
|
||
|
|
(processed-by "wit-component" "$CARGO_PKG_VERSION")
|
||
|
|
)
|
||
|
|
)
|