Skip to content

Commit 362b0cf

Browse files
committed
Fix more type identifiers in exports in WAT
1 parent 8f853f6 commit 362b0cf

File tree

4 files changed

+31
-31
lines changed

4 files changed

+31
-31
lines changed

tests/misc_testsuite/component-model/fused.wast

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -910,11 +910,11 @@
910910
(type $c' (variant (case "a" u64) (case "b" float64)))
911911
(type $d' (variant (case "a" float32) (case "b" float64)))
912912
(type $e' (variant (case "a" float32) (case "b" s64)))
913-
(export $a "t-a" (type (eq $a')))
914-
(export $b "t-b" (type (eq $b')))
915-
(export $c "t-c" (type (eq $c')))
916-
(export $d "t-d" (type (eq $d')))
917-
(export $e "t-e" (type (eq $e')))
913+
(export "t-a" (type $a (eq $a')))
914+
(export "t-b" (type $b (eq $b')))
915+
(export "t-c" (type $c (eq $c')))
916+
(export "t-d" (type $d (eq $d')))
917+
(export "t-e" (type $e (eq $e')))
918918
(type $func_a (func (param "x" bool) (param "a" $a)))
919919
(type $func_b (func (param "x" bool) (param "b" $b)))
920920
(type $func_c (func (param "x" bool) (param "c" $c)))
@@ -1035,7 +1035,7 @@
10351035
(case "c" (tuple float32 u32))
10361036
(case "d" (tuple float32 u64 u8))
10371037
))
1038-
(export $a "t-a" (type (eq $a')))
1038+
(export "t-a" (type $a (eq $a')))
10391039
(export "a" (func (param "x" u8) (param "a" $a)))
10401040
))
10411041

@@ -1264,12 +1264,12 @@
12641264

12651265
(component $c2
12661266
(import "a" (instance $i
1267-
(export $f1 "t-f1" (type (eq $f1')))
1268-
(export $f8 "t-f8" (type (eq $f8')))
1269-
(export $f9 "t-f9" (type (eq $f9')))
1270-
(export $f16 "t-f16" (type (eq $f16')))
1271-
(export $f17 "t-f17" (type (eq $f17')))
1272-
(export $f32 "t-f32" (type (eq $f32')))
1267+
(export "t-f1" (type $f1 (eq $f1')))
1268+
(export "t-f8" (type $f8 (eq $f8')))
1269+
(export "t-f9" (type $f9 (eq $f9')))
1270+
(export "t-f16" (type $f16 (eq $f16')))
1271+
(export "t-f17" (type $f17 (eq $f17')))
1272+
(export "t-f32" (type $f32 (eq $f32')))
12731273
(export "f1" (func (param "a" $f1)))
12741274
(export "f8" (func (param "a" $f8)))
12751275
(export "f9" (func (param "a" $f9)))

tests/misc_testsuite/component-model/instance.wast

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,9 @@
182182
(component
183183
(import "host" (instance $i
184184
(type $x' (record (field "x" u32)))
185-
(export $x "x" (type (eq $x')))
185+
(export "x" (type $x (eq $x')))
186186
(type $rec' (record (field "x" $x) (field "y" string)))
187-
(export $rec "rec" (type (eq $rec')))
187+
(export "rec" (type $rec (eq $rec')))
188188
(export "some-record" (type (eq $rec)))))
189189
)
190190

tests/misc_testsuite/component-model/resources.wast

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@
188188
;; equality constraints also work
189189
(component
190190
(import "host" (instance
191-
(export $r1 "resource1" (type (sub resource)))
191+
(export "resource1" (type $r1 (sub resource)))
192192
(export "resource2" (type (sub resource)))
193193
(export "resource1-again" (type (eq $r1)))
194194
))
@@ -199,7 +199,7 @@
199199
(component
200200
(import "host" (instance
201201
(export "resource1" (type (sub resource)))
202-
(export $r1 "resource2" (type (sub resource)))
202+
(export "resource2" (type $r1 (sub resource)))
203203
(export "resource1-again" (type (eq $r1)))
204204
))
205205
)
@@ -208,7 +208,7 @@
208208
;; equality constraints mean that types don't need to be supplied
209209
(component
210210
(import "host" (instance
211-
(export $r1 "resource1" (type (sub resource)))
211+
(export "resource1" (type $r1 (sub resource)))
212212
(export "resource2" (type (sub resource)))
213213
(export "this-name-is-not-provided-in-the-wast-harness" (type (eq $r1)))
214214
))
@@ -217,7 +217,7 @@
217217
;; simple properties of handles
218218
(component
219219
(import "host" (instance $host
220-
(export $r "resource1" (type (sub resource)))
220+
(export "resource1" (type $r (sub resource)))
221221
(export "[constructor]resource1" (func (param "r" u32) (result (own $r))))
222222
(export "[static]resource1.assert" (func (param "r" (own $r)) (param "rep" u32)))
223223
))
@@ -268,7 +268,7 @@
268268
;; Using an index that has never been valid is a trap
269269
(component
270270
(import "host" (instance $host
271-
(export $r "resource1" (type (sub resource)))
271+
(export "resource1" (type $r (sub resource)))
272272
(export "[static]resource1.assert" (func (param "r" (own $r)) (param "rep" u32)))
273273
))
274274
(alias export $host "resource1" (type $r))
@@ -296,7 +296,7 @@
296296
;; Using an index which was previously valid but no longer valid is also a trap.
297297
(component
298298
(import "host" (instance $host
299-
(export $r "resource1" (type (sub resource)))
299+
(export "resource1" (type $r (sub resource)))
300300
(export "[constructor]resource1" (func (param "r" u32) (result (own $r))))
301301
(export "[static]resource1.assert" (func (param "r" (own $r)) (param "rep" u32)))
302302
))
@@ -338,7 +338,7 @@
338338
;; Also invalid to pass a previously valid handle to the drop intrinsic
339339
(component
340340
(import "host" (instance $host
341-
(export $r "resource1" (type (sub resource)))
341+
(export "resource1" (type $r (sub resource)))
342342
(export "[constructor]resource1" (func (param "r" u32) (result (own $r))))
343343
))
344344
(alias export $host "resource1" (type $r))
@@ -380,15 +380,15 @@
380380
;; should not implicitly have access to that resource.
381381
(component
382382
(import "host" (instance $host
383-
(export $r "resource1" (type (sub resource)))
383+
(export "resource1" (type $r (sub resource)))
384384
(export "[constructor]resource1" (func (param "r" u32) (result (own $r))))
385385
))
386386

387387
;; an inner component which upon instantiation will invoke the constructor,
388388
;; assert that it's zero, and then forget about it.
389389
(component $inner
390390
(import "host" (instance $host
391-
(export $r "resource1" (type (sub resource)))
391+
(export "resource1" (type $r (sub resource)))
392392
(export "[constructor]resource1" (func (param "r" u32) (result (own $r))))
393393
))
394394
(alias export $host "[constructor]resource1" (func $ctor))
@@ -534,7 +534,7 @@
534534
;; should not be visible in the other.
535535
(component
536536
(import "host" (instance $host
537-
(export $r "resource1" (type (sub resource)))
537+
(export "resource1" (type $r (sub resource)))
538538
(export "[constructor]resource1" (func (param "r" u32) (result (own $r))))
539539
))
540540
(alias export $host "resource1" (type $r))
@@ -745,7 +745,7 @@
745745
;; Test dropping a host resource
746746
(component
747747
(import "host" (instance $host
748-
(export $r "resource1" (type (sub resource)))
748+
(export "resource1" (type $r (sub resource)))
749749
(export "[constructor]resource1" (func (param "r" u32) (result (own $r))))
750750
(export "[static]resource1.last-drop" (func (result u32)))
751751
(export "[static]resource1.drops" (func (result u32)))
@@ -809,7 +809,7 @@
809809
;; Test some bare-bones basics of borrowed resources
810810
(component
811811
(import "host" (instance $host
812-
(export $r "resource1" (type (sub resource)))
812+
(export "resource1" (type $r (sub resource)))
813813
(export "[constructor]resource1" (func (param "r" u32) (result (own $r))))
814814
(export "[method]resource1.simple" (func (param "self" (borrow $r)) (param "rep" u32)))
815815
(export "[method]resource1.take-borrow" (func (param "self" (borrow $r)) (param "b" (borrow $r))))
@@ -886,7 +886,7 @@
886886
;; Cannot pass out an owned resource when it's borrowed by the same call
887887
(component
888888
(import "host" (instance $host
889-
(export $r "resource1" (type (sub resource)))
889+
(export "resource1" (type $r (sub resource)))
890890
(export "[constructor]resource1" (func (param "r" u32) (result (own $r))))
891891
(export "[method]resource1.take-own" (func (param "self" (borrow $r)) (param "b" (own $r))))
892892
))
@@ -927,7 +927,7 @@
927927
;; Borrows must actually exist
928928
(component
929929
(import "host" (instance $host
930-
(export $r "resource1" (type (sub resource)))
930+
(export "resource1" (type $r (sub resource)))
931931
(export "[method]resource1.simple" (func (param "self" (borrow $r)) (param "b" u32)))
932932
))
933933

@@ -996,7 +996,7 @@
996996

997997
(component $B
998998
(import "a" (instance $i
999-
(export $t "t" (type (sub resource)))
999+
(export "t" (type $t (sub resource)))
10001000
(export "[constructor]t" (func (param "x" u32) (result (own $t))))
10011001
(export "[method]t.assert" (func (param "self" (borrow $t)) (param "x" u32)))
10021002
(export "[static]t.assert-own" (func (param "self" (own $t)) (param "x" u32)))

tests/misc_testsuite/component-model/types.wast

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@
250250

251251
(component
252252
(type (instance
253-
(export $x "x" (instance
253+
(export "x" (instance $x
254254
(type $t u32)
255255
(export "y" (type (eq $t)))
256256
))
@@ -331,7 +331,7 @@
331331
(component
332332
(import "a" (instance
333333
(type $t1 u64)
334-
(export $t2 "a" (type (eq $t1)))
334+
(export "a" (type $t2 (eq $t1)))
335335
(export "b" (type (eq $t2)))
336336
))
337337
)

0 commit comments

Comments
 (0)