Skip to content

Commit 97ebb0c

Browse files
committed
update and disable two more subtyping tests
1 parent 83e336c commit 97ebb0c

File tree

4 files changed

+22
-67
lines changed

4 files changed

+22
-67
lines changed

test/passes/flatten_all-features.txt

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
(type $i32_=>_i32 (func (param i32) (result i32)))
66
(type $none_=>_f32 (func (result f32)))
77
(type $i64_i64_=>_i64 (func (param i64 i64) (result i64)))
8-
(type $none_=>_externref (func (result externref)))
98
(memory $0 10)
109
(table $0 1 1 funcref)
1110
(elem (i32.const 0) $call-me)
@@ -2376,49 +2375,6 @@
23762375
)
23772376
(unreachable)
23782377
)
2379-
(func $subtype (result externref)
2380-
(local $0 externref)
2381-
(local $1 externref)
2382-
(local $2 externref)
2383-
(local $3 externref)
2384-
(local $4 externref)
2385-
(local $5 externref)
2386-
(local $6 externref)
2387-
(block $label0
2388-
(block $block
2389-
(local.set $1
2390-
(ref.null extern)
2391-
)
2392-
(br_if $label0
2393-
(i32.const 0)
2394-
)
2395-
(local.set $2
2396-
(local.get $1)
2397-
)
2398-
(local.set $0
2399-
(local.get $2)
2400-
)
2401-
(local.set $3
2402-
(local.get $0)
2403-
)
2404-
(local.set $4
2405-
(local.get $3)
2406-
)
2407-
)
2408-
(local.set $5
2409-
(local.get $4)
2410-
)
2411-
(local.set $1
2412-
(local.get $5)
2413-
)
2414-
)
2415-
(local.set $6
2416-
(local.get $1)
2417-
)
2418-
(return
2419-
(local.get $6)
2420-
)
2421-
)
24222378
)
24232379
(module
24242380
(type $i64_f32_=>_none (func (param i64 f32)))

test/passes/flatten_all-features.wast

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1020,25 +1020,27 @@
10201020
(return (i32.sub (i32.const 1) (i32.const 2)))
10211021
)
10221022

1023+
;; TODO (GC)
10231024
;; subtypes
10241025

10251026
;; br_if leaves a value on the stack if not taken, which later can be the last
10261027
;; element of the enclosing innermost block and flow out. So in case br_if
10271028
;; targets an outer branch whose return type is a supertype of the br_if's
10281029
;; value type, we need the value to be set into two locals: one with the outer
10291030
;; block's type, and one with its value type.
1030-
(func $subtype (result externref) (local $0 externref)
1031-
(block $label0 (result externref)
1032-
(block (result externref)
1033-
(local.tee $0
1034-
(br_if $label0
1035-
(ref.null extern)
1036-
(i32.const 0)
1037-
)
1038-
)
1039-
)
1040-
)
1041-
)
1031+
;; (func $subtype (result externref)
1032+
;; (local $0 anyref)
1033+
;; (block $label0 (result externref)
1034+
;; (block (result anyref)
1035+
;; (local.tee $0
1036+
;; (br_if $label0
1037+
;; (ref.null extern)
1038+
;; (i32.const 0)
1039+
;; )
1040+
;; )
1041+
;; )
1042+
;; )
1043+
;; )
10421044
)
10431045
(module
10441046
(func $0 (param $0 i64) (param $1 f32)

test/passes/optimize-instructions_all-features.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
(type $i32_i32_f64_f64_=>_none (func (param i32 i32 f64 f64)))
1515
(type $i32_i64_f64_i32_=>_none (func (param i32 i64 f64 i32)))
1616
(type $none_=>_f64 (func (result f64)))
17-
(type $none_=>_externref (func (result externref)))
1817
(memory $0 0)
1918
(export "load-off-2" (func $load-off-2))
2019
(func $f (param $i1 i32) (param $i2 i64)
@@ -3712,9 +3711,6 @@
37123711
(unreachable)
37133712
)
37143713
)
3715-
(func $if-arms-subtype (result externref)
3716-
(ref.null extern)
3717-
)
37183714
(func $optimize-boolean-context (param $x i32) (param $y i32)
37193715
(if
37203716
(local.get $x)

test/passes/optimize-instructions_all-features.wast

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4207,14 +4207,15 @@
42074207
(unreachable)
42084208
)
42094209
)
4210+
;; TODO (GC)
42104211
;; Tests when if arms are subtype of if's type
4211-
(func $if-arms-subtype (result externref)
4212-
(if (result externref)
4213-
(i32.const 0)
4214-
(ref.null extern)
4215-
(ref.null extern)
4216-
)
4217-
)
4212+
;; (func $if-arms-subtype (result anyref)
4213+
;; (if (result anyref)
4214+
;; (i32.const 0)
4215+
;; (ref.null extern)
4216+
;; (ref.null func)
4217+
;; )
4218+
;; )
42184219
(func $optimize-boolean-context (param $x i32) (param $y i32)
42194220
;; 0 - x ==> x
42204221
(if

0 commit comments

Comments
 (0)