|
19 | 19 | ;; This is only used in the secondary module, but segments $keep-data2 can trap |
20 | 20 | ;; so it is pinned to the primary, so this will be too. |
21 | 21 | (memory $keep-memory2 1 1) |
22 | | - (global $keep-global i32 (i32.const 20)) |
| 22 | + (global $keep-immutable-global i32 (i32.const 20)) |
| 23 | + (global $keep-mutable-global (mut i32) (i32.const 20)) |
23 | 24 | (table $keep-table 1 1 funcref) |
24 | 25 | ;; This is only used in the secondary module, but segments $keep-elem2 and |
25 | 26 | ;; $keep-elem3 can trap so they are pinned to the primary, so this will be too. |
|
35 | 36 | (data $keep-data2 (memory $keep-memory2) (i32.const 65536) "a") |
36 | 37 |
|
37 | 38 | (memory $split-memory 1 1) |
38 | | - (global $split-global i32 (i32.const 20)) |
| 39 | + (global $split-immutable-global i32 (i32.const 20)) |
| 40 | + (global $split-mutable-global (mut i32) (i32.const 20)) |
39 | 41 | (table $split-table 1 1 funcref) |
40 | 42 | (tag $split-tag (param i32)) |
41 | 43 | (elem $split-elem (table $split-table) (i32.const 0) funcref (item (ref.null nofunc))) |
42 | 44 | (data $split-data (memory $split-memory) (i32.const 0) "a") |
43 | 45 |
|
44 | 46 | (memory $shared-memory 1 1) |
45 | | - (global $shared-global i32 (i32.const 20)) |
| 47 | + (global $shared-immutable-global i32 (i32.const 20)) |
| 48 | + (global $shared-mutable-global (mut i32) (i32.const 20)) |
46 | 49 | (table $shared-table 1 1 funcref) |
47 | 50 | (tag $shared-tag (param i32)) |
48 | 51 | (elem $shared-elem (table $shared-table) (i32.const 0) funcref (item (ref.null nofunc))) |
49 | 52 | (data $shared-data (memory $shared-memory) (i32.const 0) "a") |
50 | 53 |
|
51 | | - ;; PRIMARY: (global $keep-global i32 (i32.const 20)) |
52 | | - ;; PRIMARY-NEXT: (global $shared-global i32 (i32.const 20)) |
| 54 | + ;; PRIMARY: (global $keep-immutable-global i32 (i32.const 20)) |
| 55 | + ;; PRIMARY-NEXT: (global $keep-mutable-global (mut i32) (i32.const 20)) |
| 56 | + ;; PRIMARY-NEXT: (global $shared-immutable-global i32 (i32.const 20)) |
| 57 | + ;; PRIMARY-NEXT: (global $shared-mutable-global (mut i32) (i32.const 20)) |
53 | 58 | ;; PRIMARY-NEXT: (memory $keep-memory 1 1) |
54 | 59 | ;; PRIMARY-NEXT: (memory $keep-memory2 1 1) |
55 | 60 | ;; PRIMARY-NEXT: (memory $shared-memory 1 1) |
|
73 | 78 | ;; PRIMARY-NEXT: (export "memory_1" (memory $shared-memory)) |
74 | 79 | ;; PRIMARY-NEXT: (export "table" (table $keep-table2)) |
75 | 80 | ;; PRIMARY-NEXT: (export "table_3" (table $shared-table)) |
76 | | - ;; PRIMARY-NEXT: (export "global" (global $shared-global)) |
| 81 | + ;; PRIMARY-NEXT: (export "global" (global $shared-immutable-global)) |
| 82 | + ;; PRIMARY-NEXT: (export "global_5" (global $shared-mutable-global)) |
77 | 83 | ;; PRIMARY-NEXT: (export "tag" (tag $shared-tag)) |
78 | 84 | ;; PRIMARY-NEXT: (export "keep" (func $keep)) |
79 | | - ;; PRIMARY-NEXT: (export "table_7" (table $3)) |
| 85 | + ;; PRIMARY-NEXT: (export "table_8" (table $3)) |
80 | 86 |
|
81 | 87 | ;; SECONDARY: (import "primary" "memory" (memory $keep-memory2 1 1)) |
82 | 88 | ;; SECONDARY-NEXT: (import "primary" "memory_1" (memory $shared-memory 1 1)) |
83 | 89 | ;; SECONDARY-NEXT: (import "primary" "table" (table $keep-table2 1 1 (ref null $2))) |
84 | 90 | ;; SECONDARY-NEXT: (import "primary" "table_3" (table $shared-table 1 1 funcref)) |
85 | | - ;; SECONDARY-NEXT: (import "primary" "table_7" (table $timport$2 1 funcref)) |
86 | | - ;; SECONDARY-NEXT: (import "primary" "global" (global $shared-global i32)) |
| 91 | + ;; SECONDARY-NEXT: (import "primary" "table_8" (table $timport$2 1 funcref)) |
| 92 | + ;; SECONDARY-NEXT: (import "primary" "global" (global $shared-immutable-global i32)) |
| 93 | + ;; SECONDARY-NEXT: (import "primary" "global_5" (global $shared-mutable-global (mut i32))) |
87 | 94 | ;; SECONDARY-NEXT: (import "primary" "keep" (func $keep (exact (param i32) (result i32)))) |
88 | 95 | ;; SECONDARY-NEXT: (import "primary" "tag" (tag $shared-tag (type $1) (param i32))) |
89 | 96 |
|
90 | | - ;; SECONDARY: (global $split-global i32 (i32.const 20)) |
| 97 | + ;; SECONDARY: (global $split-immutable-global i32 (i32.const 20)) |
| 98 | + ;; SECONDARY-NEXT: (global $split-mutable-global (mut i32) (i32.const 20)) |
91 | 99 | ;; SECONDARY-NEXT: (memory $split-memory 1 1) |
92 | 100 | ;; SECONDARY-NEXT: (data $split-data (memory $split-memory) (i32.const 0) "a") |
93 | 101 | ;; SECONDARY-NEXT: (table $split-table 1 1 funcref) |
|
109 | 117 | (i32.const 0) |
110 | 118 | ) |
111 | 119 | ) |
112 | | - ;; Uses $keep-global |
| 120 | + ;; Uses $keep-immutable-global and $keep-mutable-global |
113 | 121 | (drop |
114 | | - (global.get $keep-global) |
| 122 | + (global.get $keep-immutable-global) |
| 123 | + ) |
| 124 | + (drop |
| 125 | + (global.get $keep-mutable-global) |
115 | 126 | ) |
116 | 127 | ;; Uses $keep-tag |
117 | 128 | (try_table (catch $keep-tag 0) |
|
130 | 141 | (i32.const 0) |
131 | 142 | ) |
132 | 143 | ) |
133 | | - ;; Uses $shared-global |
| 144 | + ;; Uses $shared-immutable-global and $shared-mutable-global |
| 145 | + (drop |
| 146 | + (global.get $shared-immutable-global) |
| 147 | + ) |
134 | 148 | (drop |
135 | | - (global.get $shared-global) |
| 149 | + (global.get $shared-mutable-global) |
136 | 150 | ) |
137 | 151 | ;; Uses $shared-tag |
138 | 152 | (try_table (catch $shared-tag 0) |
|
166 | 180 | (drop |
167 | 181 | (table.get $keep-table2 (i32.const 0)) |
168 | 182 | ) |
169 | | - ;; Uses $split-global |
| 183 | + ;; Uses $split-immutable-global and $shared-mutable-global |
170 | 184 | (drop |
171 | | - (global.get $split-global) |
| 185 | + (global.get $split-immutable-global) |
| 186 | + ) |
| 187 | + (drop |
| 188 | + (global.get $split-mutable-global) |
172 | 189 | ) |
173 | 190 | ;; Uses $split-tag |
174 | 191 | (try_table (catch $split-tag 0) |
|
187 | 204 | (i32.const 0) |
188 | 205 | ) |
189 | 206 | ) |
190 | | - ;; Uses $shared-global |
| 207 | + ;; Uses $shared-immutable-global and $shared-mutable-global |
| 208 | + (drop |
| 209 | + (global.get $shared-immutable-global) |
| 210 | + ) |
191 | 211 | (drop |
192 | | - (global.get $shared-global) |
| 212 | + (global.get $shared-mutable-global) |
193 | 213 | ) |
194 | 214 | ;; Uses $shared-tag |
195 | 215 | (try_table (catch $shared-tag 0) |
|
0 commit comments