Skip to content

Commit 139fc87

Browse files
committed
Update repos
gc: WebAssembly/gc@8107e016 function-references: WebAssembly/function-references@4c02753d This change was automatically generated by `update-testsuite.sh`
1 parent 0a394e3 commit 139fc87

7 files changed

Lines changed: 48 additions & 8 deletions

File tree

proposals/function-references/binary.wast

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1085,8 +1085,19 @@
10851085
(assert_malformed
10861086
(module binary
10871087
"\00asm" "\01\00\00\00"
1088-
"\01\04\01" ;; type section
1088+
"\01\25\0c" ;; type section
10891089
"\60\00\00" ;; type 0
1090+
"\60\00\00" ;; type 1
1091+
"\60\00\00" ;; type 2
1092+
"\60\00\00" ;; type 3
1093+
"\60\00\00" ;; type 4
1094+
"\60\00\00" ;; type 5
1095+
"\60\00\00" ;; type 6
1096+
"\60\00\00" ;; type 7
1097+
"\60\00\00" ;; type 8
1098+
"\60\00\00" ;; type 9
1099+
"\60\00\00" ;; type 10
1100+
"\60\00\00" ;; type 11
10901101
"\03\02\01\00" ;; func section
10911102
"\0a\13\01" ;; code section
10921103
"\11\00" ;; func 0
@@ -1097,8 +1108,9 @@
10971108
"\0e\01" ;; br_table with inconsistent target count (1 declared, 2 given)
10981109
"\00" ;; break depth 0
10991110
"\01" ;; break depth 1
1100-
"\02" ;; break depth for default
1101-
"\0b\0b\0b" ;; end
1111+
"\02" ;; break depth for default, interpreted as a block
1112+
"\0b" ;; end, interpreted as type 11 for the block
1113+
"\0b\0b" ;; end
11021114
)
11031115
"unexpected end of section or function"
11041116
)
@@ -1132,4 +1144,3 @@
11321144
)
11331145
"unexpected content after last section"
11341146
)
1135-

proposals/function-references/call_ref.wast

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
(assert_return (invoke "run" (i32.const 0)) (i32.const 0))
9595
(assert_return (invoke "run" (i32.const 3)) (i32.const -9))
9696

97-
(assert_trap (invoke "null") "null function")
97+
(assert_trap (invoke "null") "null function reference")
9898

9999
(assert_return (invoke "fac" (i64.const 0)) (i64.const 1))
100100
(assert_return (invoke "fac" (i64.const 1)) (i64.const 1))

proposals/function-references/if.wast

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,14 @@
524524
)
525525
(drop) (drop) (drop)
526526
)
527+
528+
;; Atypical folded condition syntax
529+
530+
(func (export "atypical-condition")
531+
i32.const 0
532+
(if (then) (else))
533+
(if (i32.const 1) (i32.eqz) (then) (else))
534+
)
527535
)
528536

529537
(assert_return (invoke "empty" (i32.const 0)))
@@ -722,6 +730,8 @@
722730

723731
(assert_return (invoke "type-use"))
724732

733+
(assert_return (invoke "atypical-condition"))
734+
725735
(assert_malformed
726736
(module quote
727737
"(type $sig (func (param i32) (result i32)))"
@@ -1548,3 +1558,7 @@
15481558
(module quote "(func i32.const 0 if $a else $l end $l)")
15491559
"mismatching label"
15501560
)
1561+
(assert_malformed
1562+
(module quote "(func (if i32.const 0 (then) (else)))")
1563+
"unexpected token"
1564+
)

proposals/function-references/return_call_ref.wast

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@
180180
(assert_return (invoke "type-second-f32") (f32.const 32))
181181
(assert_return (invoke "type-second-f64") (f64.const 64.1))
182182

183-
(assert_trap (invoke "null") "null function")
183+
(assert_trap (invoke "null") "null function reference")
184184

185185
(assert_return (invoke "fac-acc" (i64.const 0) (i64.const 1)) (i64.const 1))
186186
(assert_return (invoke "fac-acc" (i64.const 1) (i64.const 1)) (i64.const 1))

proposals/function-references/table.wast

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,21 +78,36 @@
7878
;; Table initializer
7979

8080
(module
81+
(global (export "g") (ref $f) (ref.func $f))
82+
(type $f (func))
83+
(func $f)
84+
)
85+
(register "M")
86+
87+
(module
88+
(global $g (import "M" "g") (ref $dummy))
89+
8190
(type $dummy (func))
8291
(func $dummy)
8392

8493
(table $t1 10 funcref)
8594
(table $t2 10 funcref (ref.func $dummy))
8695
(table $t3 10 (ref $dummy) (ref.func $dummy))
96+
(table $t4 10 funcref (global.get $g))
97+
(table $t5 10 (ref $dummy) (global.get $g))
8798

8899
(func (export "get1") (result funcref) (table.get $t1 (i32.const 1)))
89100
(func (export "get2") (result funcref) (table.get $t2 (i32.const 4)))
90101
(func (export "get3") (result funcref) (table.get $t3 (i32.const 7)))
102+
(func (export "get4") (result funcref) (table.get $t4 (i32.const 8)))
103+
(func (export "get5") (result funcref) (table.get $t5 (i32.const 9)))
91104
)
92105

93106
(assert_return (invoke "get1") (ref.null))
94107
(assert_return (invoke "get2") (ref.func))
95108
(assert_return (invoke "get3") (ref.func))
109+
(assert_return (invoke "get4") (ref.func))
110+
(assert_return (invoke "get5") (ref.func))
96111

97112

98113
(assert_invalid

proposals/gc/call_ref.wast

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
(assert_return (invoke "run" (i32.const 0)) (i32.const 0))
9595
(assert_return (invoke "run" (i32.const 3)) (i32.const -9))
9696

97-
(assert_trap (invoke "null") "null function")
97+
(assert_trap (invoke "null") "null function reference")
9898

9999
(assert_return (invoke "fac" (i64.const 0)) (i64.const 1))
100100
(assert_return (invoke "fac" (i64.const 1)) (i64.const 1))

proposals/gc/return_call_ref.wast

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@
180180
(assert_return (invoke "type-second-f32") (f32.const 32))
181181
(assert_return (invoke "type-second-f64") (f64.const 64.1))
182182

183-
(assert_trap (invoke "null") "null function")
183+
(assert_trap (invoke "null") "null function reference")
184184

185185
(assert_return (invoke "fac-acc" (i64.const 0) (i64.const 1)) (i64.const 1))
186186
(assert_return (invoke "fac-acc" (i64.const 1) (i64.const 1)) (i64.const 1))

0 commit comments

Comments
 (0)