diff options
Diffstat (limited to 'test/lit')
-rw-r--r-- | test/lit/passes/cfp.wast | 3 | ||||
-rw-r--r-- | test/lit/passes/gufa-refs.wast | 4 | ||||
-rw-r--r-- | test/lit/passes/instrument-memory-gc.wast | 20 | ||||
-rw-r--r-- | test/lit/passes/merge-blocks.wast | 3 | ||||
-rw-r--r-- | test/lit/passes/optimize-instructions-gc.wast | 6 | ||||
-rw-r--r-- | test/lit/passes/precompute-gc.wast | 6 | ||||
-rw-r--r-- | test/lit/passes/signature-refining.wast | 12 |
7 files changed, 30 insertions, 24 deletions
diff --git a/test/lit/passes/cfp.wast b/test/lit/passes/cfp.wast index 782a30af2..437ace803 100644 --- a/test/lit/passes/cfp.wast +++ b/test/lit/passes/cfp.wast @@ -2028,10 +2028,11 @@ ;; Test a global type other than i32. Arrays of structs are a realistic case ;; as they are used to implement itables. + ;; CHECK: (type $itable (array_subtype (ref $vtable) data)) + ;; CHECK: (type $vtable (struct_subtype (field funcref) data)) (type $vtable (struct funcref)) - ;; CHECK: (type $itable (array_subtype (ref $vtable) data)) (type $itable (array (ref $vtable))) ;; CHECK: (type $object (struct_subtype (field $itable (ref $itable)) data)) diff --git a/test/lit/passes/gufa-refs.wast b/test/lit/passes/gufa-refs.wast index 4cfd8dede..905ce0a80 100644 --- a/test/lit/passes/gufa-refs.wast +++ b/test/lit/passes/gufa-refs.wast @@ -4203,11 +4203,11 @@ (module ;; CHECK: (type $i1 (func_subtype (param i32) func)) (type $i1 (func (param i32))) - ;; CHECK: (type $none_=>_i32 (func_subtype (result i32) func)) - ;; CHECK: (type $i2 (func_subtype (param i32) func)) (type $i2 (func (param i32))) + ;; CHECK: (type $none_=>_i32 (func_subtype (result i32) func)) + ;; CHECK: (type $none_=>_none (func_subtype func)) ;; CHECK: (import "a" "b" (func $import (result i32))) diff --git a/test/lit/passes/instrument-memory-gc.wast b/test/lit/passes/instrument-memory-gc.wast index 972096130..f41268480 100644 --- a/test/lit/passes/instrument-memory-gc.wast +++ b/test/lit/passes/instrument-memory-gc.wast @@ -27,22 +27,16 @@ (field f32) (field $named f64) )) + ;; CHECK: (type $array (array (mut f64))) + ;; NOMNL: (type $array (array_subtype (mut f64) data)) + (type $array (array (mut f64))) + ;; CHECK: (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) ;; CHECK: (type $ref|$struct|_=>_none (func (param (ref $struct)))) ;; CHECK: (type $ref|$array|_=>_none (func (param (ref $array)))) - ;; CHECK: (type $array (array (mut f64))) - ;; NOMNL: (type $i32_i32_i32_i32_=>_i32 (func_subtype (param i32 i32 i32 i32) (result i32) func)) - - ;; NOMNL: (type $ref|$struct|_=>_none (func_subtype (param (ref $struct)) func)) - - ;; NOMNL: (type $ref|$array|_=>_none (func_subtype (param (ref $array)) func)) - - ;; NOMNL: (type $array (array_subtype (mut f64) data)) - (type $array (array (mut f64))) - ;; CHECK: (import "env" "load_ptr" (func $load_ptr (param i32 i32 i32 i32) (result i32))) ;; CHECK: (import "env" "load_val_i32" (func $load_val_i32 (param i32 i32) (result i32))) @@ -132,6 +126,12 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) + ;; NOMNL: (type $i32_i32_i32_i32_=>_i32 (func_subtype (param i32 i32 i32 i32) (result i32) func)) + + ;; NOMNL: (type $ref|$struct|_=>_none (func_subtype (param (ref $struct)) func)) + + ;; NOMNL: (type $ref|$array|_=>_none (func_subtype (param (ref $array)) func)) + ;; NOMNL: (import "env" "load_ptr" (func $load_ptr (param i32 i32 i32 i32) (result i32))) ;; NOMNL: (import "env" "load_val_i32" (func $load_val_i32 (param i32 i32) (result i32))) diff --git a/test/lit/passes/merge-blocks.wast b/test/lit/passes/merge-blocks.wast index e22f4c604..f858b0dc8 100644 --- a/test/lit/passes/merge-blocks.wast +++ b/test/lit/passes/merge-blocks.wast @@ -8,10 +8,11 @@ (module (type $anyref_=>_none (func (param anyref))) + ;; CHECK: (type $array (array (mut i32))) + ;; CHECK: (type $struct (struct (field (mut i32)))) (type $struct (struct (field (mut i32)))) - ;; CHECK: (type $array (array (mut i32))) (type $array (array (mut i32))) ;; CHECK: (func $br_on_to_drop diff --git a/test/lit/passes/optimize-instructions-gc.wast b/test/lit/passes/optimize-instructions-gc.wast index 6a52f2f44..da2411eed 100644 --- a/test/lit/passes/optimize-instructions-gc.wast +++ b/test/lit/passes/optimize-instructions-gc.wast @@ -18,14 +18,12 @@ ;; NOMNL: (type $A (struct_subtype (field i32) data)) (type $A (struct (field i32))) - ;; CHECK: (type $B (struct (field i32) (field i32) (field f32))) - ;; CHECK: (type $array (array (mut i8))) - ;; NOMNL: (type $B (struct_subtype (field i32) (field i32) (field f32) $A)) - ;; NOMNL: (type $array (array_subtype (mut i8) data)) (type $array (array (mut i8))) + ;; CHECK: (type $B (struct (field i32) (field i32) (field f32))) + ;; NOMNL: (type $B (struct_subtype (field i32) (field i32) (field f32) $A)) (type $B (struct_subtype (field i32) (field i32) (field f32) $A)) ;; CHECK: (type $B-child (struct (field i32) (field i32) (field f32) (field i64))) diff --git a/test/lit/passes/precompute-gc.wast b/test/lit/passes/precompute-gc.wast index 1cce11087..a3fa63bb5 100644 --- a/test/lit/passes/precompute-gc.wast +++ b/test/lit/passes/precompute-gc.wast @@ -15,12 +15,14 @@ ;; two incompatible struct types (type $A (struct (field (mut f32)))) + ;; CHECK: (type $func-return-i32 (func (result i32))) + ;; CHECK: (type $B (struct (field (mut f64)))) + ;; NOMNL: (type $func-return-i32 (func_subtype (result i32) func)) + ;; NOMNL: (type $B (struct_subtype (field (mut f64)) data)) (type $B (struct (field (mut f64)))) - ;; CHECK: (type $func-return-i32 (func (result i32))) - ;; NOMNL: (type $func-return-i32 (func_subtype (result i32) func)) (type $func-return-i32 (func (result i32))) ;; CHECK: (import "fuzzing-support" "log-i32" (func $log (param i32))) diff --git a/test/lit/passes/signature-refining.wast b/test/lit/passes/signature-refining.wast index 784037b61..e5f42ffa0 100644 --- a/test/lit/passes/signature-refining.wast +++ b/test/lit/passes/signature-refining.wast @@ -36,10 +36,11 @@ (module ;; As above, but the call is via call_ref. + ;; CHECK: (type $sig (func_subtype (param (ref $struct)) func)) + ;; CHECK: (type $struct (struct_subtype data)) (type $struct (struct_subtype data)) - ;; CHECK: (type $sig (func_subtype (param (ref $struct)) func)) (type $sig (func_subtype (param anyref) func)) ;; CHECK: (type $none_=>_none (func_subtype func)) @@ -71,10 +72,11 @@ ;; call uses a nullable $struct, the other a non-nullable dataref, so the LUB ;; is a nullable dataref. + ;; CHECK: (type $sig (func_subtype (param dataref) func)) + ;; CHECK: (type $struct (struct_subtype data)) (type $struct (struct_subtype data)) - ;; CHECK: (type $sig (func_subtype (param dataref) func)) (type $sig (func_subtype (param anyref) func)) ;; CHECK: (type $none_=>_none (func_subtype func)) @@ -266,10 +268,11 @@ ;; An unreachable value does not prevent optimization: we will update the ;; param to be $struct. + ;; CHECK: (type $sig (func_subtype (param (ref $struct)) func)) + ;; CHECK: (type $struct (struct_subtype data)) (type $struct (struct_subtype data)) - ;; CHECK: (type $sig (func_subtype (param (ref $struct)) func)) (type $sig (func_subtype (param anyref) func)) ;; CHECK: (type $none_=>_none (func_subtype func)) @@ -356,9 +359,10 @@ ;; CHECK: (type $struct (struct_subtype data)) (type $struct (struct_subtype data)) + ;; CHECK: (type $sig-2 (func_subtype (param eqref (ref $struct)) func)) + ;; CHECK: (type $sig-1 (func_subtype (param dataref anyref) func)) (type $sig-1 (func_subtype (param anyref) (param anyref) func)) - ;; CHECK: (type $sig-2 (func_subtype (param eqref (ref $struct)) func)) (type $sig-2 (func_subtype (param anyref) (param anyref) func)) ;; CHECK: (type $none_=>_none (func_subtype func)) |