Files
cli/vendor/wit-component/tests/components/merge-import-versions/component.wat

126 lines
5.4 KiB
Plaintext

(component
(type $ty-a:b/c@0.1.1 (;0;)
(instance
(export (;0;) "r" (type (sub resource)))
(type (;1;) (own 0))
(type (;2;) (func (result 1)))
(export (;0;) "[constructor]r" (func (type 2)))
(type (;3;) (borrow 0))
(type (;4;) (func (param "self" 3)))
(export (;1;) "[method]r.x" (func (type 4)))
(type (;5;) (func (param "x" string)))
(export (;2;) "x" (func (type 5)))
(export (;3;) "x2" (func (type 5)))
(type (;6;) (func))
(export (;4;) "y" (func (type 6)))
)
)
(import "a:b/c@0.1.1" (instance $a:b/c@0.1.1 (;0;) (type $ty-a:b/c@0.1.1)))
(core module $main (;0;)
(type (;0;) (func (result i32)))
(type (;1;) (func (param i32)))
(type (;2;) (func (param i32 i32)))
(type (;3;) (func))
(import "a:b/c@0.1.0" "[constructor]r" (func (;0;) (type 0)))
(import "a:b/c@0.1.0" "[resource-drop]r" (func (;1;) (type 1)))
(import "a:b/c@0.1.0" "x" (func (;2;) (type 2)))
(import "a:b/c@0.1.0" "x2" (func (;3;) (type 2)))
(import "a:b/c@0.1.1" "[constructor]r" (func (;4;) (type 0)))
(import "a:b/c@0.1.1" "[resource-drop]r" (func (;5;) (type 1)))
(import "a:b/c@0.1.1" "[method]r.x" (func (;6;) (type 1)))
(import "a:b/c@0.1.1" "x" (func (;7;) (type 2)))
(import "a:b/c@0.1.1" "x2" (func (;8;) (type 2)))
(import "a:b/c@0.1.1" "y" (func (;9;) (type 3)))
(memory (;0;) 1)
(export "memory" (memory 0))
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
(processed-by "my-fake-bindgen" "123.45")
)
)
(core module $wit-component-shim-module (;1;)
(type (;0;) (func (param i32 i32)))
(table (;0;) 2 2 funcref)
(export "0" (func $indirect-a:b/c@0.1.0-x))
(export "1" (func $indirect-a:b/c@0.1.0-x2))
(export "$imports" (table 0))
(func $indirect-a:b/c@0.1.0-x (;0;) (type 0) (param i32 i32)
local.get 0
local.get 1
i32.const 0
call_indirect (type 0)
)
(func $indirect-a:b/c@0.1.0-x2 (;1;) (type 0) (param i32 i32)
local.get 0
local.get 1
i32.const 1
call_indirect (type 0)
)
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
)
(core module $wit-component-fixup (;2;)
(type (;0;) (func (param i32 i32)))
(import "" "0" (func (;0;) (type 0)))
(import "" "1" (func (;1;) (type 0)))
(import "" "$imports" (table (;0;) 2 2 funcref))
(elem (;0;) (i32.const 0) func 0 1)
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
)
(core instance $wit-component-shim-instance (;0;) (instantiate $wit-component-shim-module))
(alias export $a:b/c@0.1.1 "[constructor]r" (func $"[constructor]r" (;0;)))
(core func $"[constructor]r" (;0;) (canon lower (func $"[constructor]r")))
(alias export $a:b/c@0.1.1 "r" (type $r (;1;)))
(core func $resource.drop (;1;) (canon resource.drop $r))
(alias core export $wit-component-shim-instance "0" (core func $indirect-a:b/c@0.1.0-x (;2;)))
(alias core export $wit-component-shim-instance "1" (core func $indirect-a:b/c@0.1.0-x2 (;3;)))
(core instance $a:b/c@0.1.0 (;1;)
(export "[constructor]r" (func $"[constructor]r"))
(export "[resource-drop]r" (func $resource.drop))
(export "x" (func $indirect-a:b/c@0.1.0-x))
(export "x2" (func $indirect-a:b/c@0.1.0-x2))
)
(alias export $a:b/c@0.1.1 "[constructor]r" (func $"#func1 [constructor]r" (@name "[constructor]r") (;1;)))
(core func $"#core-func4 [constructor]r" (@name "[constructor]r") (;4;) (canon lower (func $"#func1 [constructor]r")))
(alias export $a:b/c@0.1.1 "r" (type $"#type2 r" (@name "r") (;2;)))
(core func $"#core-func5 resource.drop" (@name "resource.drop") (;5;) (canon resource.drop $"#type2 r"))
(alias export $a:b/c@0.1.1 "[method]r.x" (func $"[method]r.x" (;2;)))
(core func $"[method]r.x" (;6;) (canon lower (func $"[method]r.x")))
(alias export $a:b/c@0.1.1 "y" (func $y (;3;)))
(core func $y (;7;) (canon lower (func $y)))
(core instance $a:b/c@0.1.1 (;2;)
(export "[constructor]r" (func $"#core-func4 [constructor]r"))
(export "[resource-drop]r" (func $"#core-func5 resource.drop"))
(export "[method]r.x" (func $"[method]r.x"))
(export "x" (func $indirect-a:b/c@0.1.0-x))
(export "x2" (func $indirect-a:b/c@0.1.0-x2))
(export "y" (func $y))
)
(core instance $main (;3;) (instantiate $main
(with "a:b/c@0.1.0" (instance $a:b/c@0.1.0))
(with "a:b/c@0.1.1" (instance $a:b/c@0.1.1))
)
)
(alias core export $main "memory" (core memory $memory (;0;)))
(alias core export $wit-component-shim-instance "$imports" (core table $"shim table" (;0;)))
(alias export $a:b/c@0.1.1 "x" (func $x (;4;)))
(core func $"#core-func8 indirect-a:b/c@0.1.0-x" (@name "indirect-a:b/c@0.1.0-x") (;8;) (canon lower (func $x) (memory $memory) string-encoding=utf8))
(alias export $a:b/c@0.1.1 "x2" (func $x2 (;5;)))
(core func $"#core-func9 indirect-a:b/c@0.1.0-x2" (@name "indirect-a:b/c@0.1.0-x2") (;9;) (canon lower (func $x2) (memory $memory) string-encoding=utf8))
(core instance $fixup-args (;4;)
(export "$imports" (table $"shim table"))
(export "0" (func $"#core-func8 indirect-a:b/c@0.1.0-x"))
(export "1" (func $"#core-func9 indirect-a:b/c@0.1.0-x2"))
)
(core instance $fixup (;5;) (instantiate $wit-component-fixup
(with "" (instance $fixup-args))
)
)
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
)