Debian Codegraph @

tests/cli/dump/alias2.wat

raw
1 ;; RUN: dump %
2
3 (component
4 (type $t (instance
5 (export "a" (core module))
6 (export "b" (func))
7 (export "c" (value string))
8 (export "d" (instance))
9 (export "e" (component))
10 ))
11
12 (import "a" (instance $i (type $t)))
13
14 (component $c
15 (import "a" (core module))
16 (import "b" (func))
17 (import "c" (value string))
18 (import "d" (instance))
19 (import "e" (component))
20 )
21
22 (instance (instantiate $c
23 (with "a" (core module $i "a"))
24 (with "b" (func $i "b"))
25 (with "c" (value $i "c"))
26 (with "d" (instance $i "d"))
27 (with "e" (component $i "e"))
28 ))
29
30 (component $c2
31 (import "a" (instance (type $t)))
32 )
33
34 (alias export $i "a" (core module $m))
35 (alias export $i "b" (func $f))
36 (alias export $i "c" (value $v))
37 (alias export $i "d" (instance $i2))
38 (alias export $i "e" (component $c3))
39
40 (instance
41 (instantiate $c2
42 (with "a" (instance
43 (export "a" (core module $m))
44 (export "b" (func $f))
45 (export "c" (value $v))
46 (export "d" (instance $i2))
47 (export "e" (component $c3))
48 ))
49 )
50 )
51
52 (core module $m1
53 (func (export "1"))
54 (memory (export "2") 1)
55 (global (export "3") i32)
56 (table (export "4") 1 funcref)
57 )
58
59 (core module $m2
60 (import "" "1" (func))
61 (import "" "2" (memory 1))
62 (import "" "3" (global i32))
63 (import "" "4" (table 1 funcref))
64 )
65
66 (core instance $i (instantiate $m1))
67 (core instance (instantiate $m2 (with "" (instance $i))))
68
69 (alias core export $i "1" (core func $f))
70 (alias core export $i "2" (core memory $m))
71 (alias core export $i "3" (core global $g))
72 (alias core export $i "4" (core table $t))
73
74 (core instance
75 (instantiate $m2
76 (with "" (instance
77 (export "1" (func $f))
78 (export "2" (memory $m))
79 (export "3" (global $g))
80 (export "4" (table $t))
81 ))
82 )
83 )
84 )