summaryrefslogtreecommitdiff
path: root/test/lit
diff options
context:
space:
mode:
authorThomas Lively <tlively@google.com>2023-04-19 17:22:28 -0700
committerGitHub <noreply@github.com>2023-04-19 17:22:28 -0700
commit9e5961792a91774962815d58c5c73bfb5612e27c (patch)
tree5f076b905041cc31c0cb58b298f010cbe0a4e226 /test/lit
parent7cd2396dacf276750a3e27320d6b9d2af6f939d9 (diff)
downloadbinaryen-9e5961792a91774962815d58c5c73bfb5612e27c.tar.gz
binaryen-9e5961792a91774962815d58c5c73bfb5612e27c.tar.bz2
binaryen-9e5961792a91774962815d58c5c73bfb5612e27c.zip
Remove the ability to construct basic types in a TypeBuilder (#5678)
This capability was originally introduced to support calculating LUBs in the equirecursive type system, but has not been needed for anything except tests since the equirecursive type system was removed. Since building basic heap types is no longer useful and was a source of significant complexity, remove the APIs that allowed it and the tests that used those APIs. Also remove test/example/type-builder.cpp, since a significant portion of it tested the removed APIs and the rest is already better tested in test/gtest/type-builder.cpp.
Diffstat (limited to 'test/lit')
-rw-r--r--test/lit/fuzz-types.test82
1 files changed, 41 insertions, 41 deletions
diff --git a/test/lit/fuzz-types.test b/test/lit/fuzz-types.test
index b10df152b..c1748e646 100644
--- a/test/lit/fuzz-types.test
+++ b/test/lit/fuzz-types.test
@@ -1,66 +1,66 @@
;; RUN: wasm-fuzz-types -v --seed=1 | filecheck %s
-;; CHECK: (type $0 (struct))
-;; CHECK-NEXT: (rec
-;; CHECK-NEXT: (type $1 (struct))
-;; CHECK-NEXT: (type $2 (array i16))
-;; CHECK-NEXT: (type $3 (func))
-;; CHECK-NEXT: (type $4 (func (param (ref $5) i32 i64 f64 f64 (ref eq) v128) (result i64)))
-;; CHECK-NEXT: (type $5 (array (mut i32)))
+;; CHECK: (rec
+;; CHECK-NEXT: (type $0 (struct (field (mut (ref $1)) f64 v128 (mut (ref null $1)) (mut (ref null $0)) (ref $1))))
+;; CHECK-NEXT: (type $1 (struct (field (mut v128) (mut (ref null $1)) (mut i8) (mut i16) (mut i16))))
;; CHECK-NEXT: )
;; CHECK-NEXT: (rec
-;; CHECK-NEXT: (type $6 (array (mut funcref)))
-;; CHECK-NEXT: (type $7 (func (param f64) (result i64)))
+;; CHECK-NEXT: (type $2 (array (mut i16)))
+;; CHECK-NEXT: (type $3 (func))
;; CHECK-NEXT: )
;; CHECK-NEXT: (rec
-;; CHECK-NEXT: (type $8 (struct_subtype (field f64 (ref $2) f64 (mut (ref null $9))) $1))
-;; CHECK-NEXT: (type $9 (func_subtype (param (ref array) i32 i64 f64 f64 anyref v128) (result i64) $4))
+;; CHECK-NEXT: (type $4 (func (param f32) (result f64)))
+;; CHECK-NEXT: (type $5 (array v128))
+;; CHECK-NEXT: (type $6 (array (mut (ref null $3))))
+;; CHECK-NEXT: (type $7 (func (param v128) (result f32)))
+;; CHECK-NEXT: (type $8 (struct_subtype (field (mut v128) (mut (ref null $1)) (mut i8) (mut i16) (mut i16) (mut i64)) $1))
;; CHECK-NEXT: )
+;; CHECK-NEXT: (type $9 (func_subtype (param v128) (result f32) $7))
+;; CHECK-NEXT: (type $10 (struct_subtype (field (mut (ref $1)) f64 v128 (mut (ref null $1)) (mut (ref null $0)) (ref $1)) $0))
;; CHECK-NEXT: (rec
-;; CHECK-NEXT: (type $10 (func_subtype (param (ref eq) i32 i64 f64 f64 anyref v128) (result i64) $9))
-;; CHECK-NEXT: (type $11 (array_subtype (mut funcref) $6))
-;; CHECK-NEXT: (type $12 (array nullref))
-;; CHECK-NEXT: (type $13 none)
-;; CHECK-NEXT: (type $14 (array (ref $6)))
-;; CHECK-NEXT: (type $15 (array i32))
+;; CHECK-NEXT: (type $11 (struct))
+;; CHECK-NEXT: (type $12 (struct (field (mut i32) (mut i32) v128)))
;; CHECK-NEXT: )
;; CHECK-NEXT: (rec
-;; CHECK-NEXT: (type $16 (array_subtype (ref none) $12))
-;; CHECK-NEXT: (type $17 (func (param (ref null $9)) (result f32 structref)))
-;; CHECK-NEXT: (type $18 none)
+;; CHECK-NEXT: (type $13 (func (param (ref null $4)) (result f32)))
+;; CHECK-NEXT: (type $14 (array_subtype (mut i16) $2))
+;; CHECK-NEXT: (type $15 (struct (field (mut v128) (ref extern) (mut (ref $15)))))
+;; CHECK-NEXT: (type $16 (struct_subtype (field (mut v128) (ref extern) (mut (ref $15))) $15))
+;; CHECK-NEXT: (type $17 (struct_subtype (field (mut (ref $1)) f64 v128 (mut (ref null $1)) (mut (ref null $0)) (ref $1)) $0))
+;; CHECK-NEXT: (type $18 (func_subtype (param f32) (result f64) $4))
;; CHECK-NEXT: )
-;; CHECK-NEXT: (type $19 (func_subtype (param (ref any) i32 i64 f64 f64 anyref v128) (result i64) $9))
+;; CHECK-NEXT: (type $19 (func (result v128)))
;; CHECK-NEXT:
;; CHECK-NEXT: Inhabitable types:
;; CHECK-NEXT:
;; CHECK-NEXT: Built 20 types:
-;; CHECK-NEXT: (type $0 (struct))
;; CHECK-NEXT: (rec
-;; CHECK-NEXT: (type $1 (struct))
-;; CHECK-NEXT: (type $2 (array i16))
-;; CHECK-NEXT: (type $3 (func))
-;; CHECK-NEXT: (type $4 (func (param (ref $5) i32 i64 f64 f64 (ref eq) v128) (result i64)))
-;; CHECK-NEXT: (type $5 (array (mut i32)))
+;; CHECK-NEXT: (type $0 (struct (field (mut (ref $1)) f64 v128 (mut (ref null $1)) (mut (ref null $0)) (ref $1))))
+;; CHECK-NEXT: (type $1 (struct (field (mut v128) (mut (ref null $1)) (mut i8) (mut i16) (mut i16))))
;; CHECK-NEXT: )
;; CHECK-NEXT: (rec
-;; CHECK-NEXT: (type $6 (array (mut funcref)))
-;; CHECK-NEXT: (type $7 (func (param f64) (result i64)))
+;; CHECK-NEXT: (type $2 (array (mut i16)))
+;; CHECK-NEXT: (type $3 (func))
;; CHECK-NEXT: )
;; CHECK-NEXT: (rec
-;; CHECK-NEXT: (type $8 (struct_subtype (field f64 (ref $2) f64 (mut (ref null $9))) $1))
-;; CHECK-NEXT: (type $9 (func_subtype (param (ref array) i32 i64 f64 f64 anyref v128) (result i64) $4))
+;; CHECK-NEXT: (type $4 (func (param f32) (result f64)))
+;; CHECK-NEXT: (type $5 (array v128))
+;; CHECK-NEXT: (type $6 (array (mut (ref null $3))))
+;; CHECK-NEXT: (type $7 (func (param v128) (result f32)))
+;; CHECK-NEXT: (type $8 (struct_subtype (field (mut v128) (mut (ref null $1)) (mut i8) (mut i16) (mut i16) (mut i64)) $1))
;; CHECK-NEXT: )
+;; CHECK-NEXT: (type $9 (func_subtype (param v128) (result f32) $7))
+;; CHECK-NEXT: (type $10 (struct_subtype (field (mut (ref $1)) f64 v128 (mut (ref null $1)) (mut (ref null $0)) (ref $1)) $0))
;; CHECK-NEXT: (rec
-;; CHECK-NEXT: (type $10 (func_subtype (param (ref eq) i32 i64 f64 f64 anyref v128) (result i64) $9))
-;; CHECK-NEXT: (type $11 (array_subtype (mut funcref) $6))
-;; CHECK-NEXT: (type $12 (array nullref))
-;; CHECK-NEXT: (type $13 none)
-;; CHECK-NEXT: (type $14 (array (ref $6)))
-;; CHECK-NEXT: (type $15 (array i32))
+;; CHECK-NEXT: (type $11 (struct))
+;; CHECK-NEXT: (type $12 (struct (field (mut i32) (mut i32) v128)))
;; CHECK-NEXT: )
;; CHECK-NEXT: (rec
-;; CHECK-NEXT: (type $16 (array_subtype nullref $12))
-;; CHECK-NEXT: (type $17 (func (param (ref null $9)) (result f32 structref)))
-;; CHECK-NEXT: (type $18 none)
+;; CHECK-NEXT: (type $13 (func (param (ref null $4)) (result f32)))
+;; CHECK-NEXT: (type $14 (array_subtype (mut i16) $2))
+;; CHECK-NEXT: (type $15 (struct (field (mut v128) externref (mut (ref null $15)))))
+;; CHECK-NEXT: (type $16 (struct_subtype (field (mut v128) externref (mut (ref null $15))) $15))
+;; CHECK-NEXT: (type $17 (struct_subtype (field (mut (ref $1)) f64 v128 (mut (ref null $1)) (mut (ref null $0)) (ref $1)) $0))
+;; CHECK-NEXT: (type $18 (func_subtype (param f32) (result f64) $4))
;; CHECK-NEXT: )
-;; CHECK-NEXT: (type $19 (func_subtype (param (ref any) i32 i64 f64 f64 anyref v128) (result i64) $9))
+;; CHECK-NEXT: (type $19 (func (result v128)))