File tree Expand file tree Collapse file tree 5 files changed +59
-5
lines changed
Expand file tree Collapse file tree 5 files changed +59
-5
lines changed Original file line number Diff line number Diff line change 669669 (module binary
670670 " \00 asm" " \01\00\00\00 "
671671 " \05\03\01 " ;; memory section with one entry
672- " \08 " ;; malformed memory limits flag
672+ " \10 " ;; malformed memory limits flag
673673 " \00 " ;; dummy byte
674674 )
675675 " malformed limits flags"
Original file line number Diff line number Diff line change 1717 )
1818 )
1919 )
20+ (func $n2 (param $r (ref null $t )) (result i32 )
21+ (call_ref $t
22+ (ref.as_non_null
23+ (block $l (result (ref null $t ))
24+ (br_on_non_null $l (local.get $r ))
25+ (return (i32.const -2 ))
26+ )
27+ )
28+ )
29+ )
2030
2131 (elem func $f )
2232 (func $f (result i32 ) (i32.const 7 ))
2333
24- (func (export " nullable-null" ) (result i32 ) (call $n (ref.null $t )))
2534 (func (export " nonnullable-f" ) (result i32 ) (call $nn (ref.func $f )))
35+ (func (export " nullable-null" ) (result i32 ) (call $n (ref.null $t )))
2636 (func (export " nullable-f" ) (result i32 ) (call $n (ref.func $f )))
37+ (func (export " nullable2-null" ) (result i32 ) (call $n2 (ref.null $t )))
38+ (func (export " nullable2-f" ) (result i32 ) (call $n2 (ref.func $f )))
2739
2840 (func (export " unreachable" ) (result i32 )
2941 (block $l (result (ref $t ))
3648
3749(assert_trap (invoke " unreachable" ) " unreachable" )
3850
39- (assert_return (invoke " nullable-null" ) (i32.const -1 ))
4051(assert_return (invoke " nonnullable-f" ) (i32.const 7 ))
52+ (assert_return (invoke " nullable-null" ) (i32.const -1 ))
4153(assert_return (invoke " nullable-f" ) (i32.const 7 ))
54+ (assert_return (invoke " nullable2-null" ) (i32.const -2 ))
55+ (assert_return (invoke " nullable2-f" ) (i32.const 7 ))
4256
4357(module
4458 (type $t (func ))
Original file line number Diff line number Diff line change 390390 " \0a\67\6c\6f\62\61\6c\5f\69\33\32 " ;; "global_i32"
391391 " \03 " ;; GlobalImport
392392 " \7f " ;; i32
393- " \02 " ;; malformed mutability
393+ " \04 " ;; malformed mutability
394394 )
395395 " malformed mutability"
396396)
417417 " \06\86\80\80\80\00 " ;; global section
418418 " \01 " ;; length 1
419419 " \7f " ;; i32
420- " \02 " ;; malformed mutability
420+ " \04 " ;; malformed mutability
421421 " \41\00 " ;; i32.const 0
422422 " \0b " ;; end
423423 )
Original file line number Diff line number Diff line change 1919 (module (tag (result i32 )))
2020 " non-empty tag result type"
2121)
22+ (assert_invalid
23+ (module (import " " " " (tag (result i32 ))))
24+ " non-empty tag result type"
25+ )
2226
2327
2428;; Link-time typing
Original file line number Diff line number Diff line change 1+ ;; Syntax and Scoping
2+
3+ (module
4+ (type (func (param (ref 0 )) (result (ref 0 ))))
5+ (rec
6+ (type (func (param (ref 2 ))))
7+ (type (func (result (ref 1 ))))
8+ )
9+
10+ (rec)
11+ (rec (type (func )))
12+ (rec (type $t (func )))
13+ (rec (type $t1 (func )) (type (func )) (type $t2 (func )))
14+ (rec (type $g (func (param (ref $g )) (result (ref $g )))))
15+ (rec
16+ (type $h (func (param (ref $k ))))
17+ (type $k (func (result (ref $h ))))
18+ )
19+ )
20+
21+ (assert_invalid
22+ (module
23+ (type (func (param (ref 1 ))))
24+ (type (func ))
25+ )
26+ " unknown type"
27+ )
28+ (assert_invalid
29+ (module
30+ (rec (type (func (param (ref 1 )))))
31+ (rec (type (func )))
32+ )
33+ " unknown type"
34+ )
35+
36+
137;; Static matching of recursive types
238
339(module
You can’t perform that action at this time.
0 commit comments