diff options
Diffstat (limited to 'test/example')
-rw-r--r-- | test/example/type-builder-nominal.txt | 100 | ||||
-rw-r--r-- | test/example/type-builder.txt | 68 | ||||
-rw-r--r-- | test/example/typeinfo.txt | 4 |
3 files changed, 86 insertions, 86 deletions
diff --git a/test/example/type-builder-nominal.txt b/test/example/type-builder-nominal.txt index b542f212c..4da8857f2 100644 --- a/test/example/type-builder-nominal.txt +++ b/test/example/type-builder-nominal.txt @@ -1,24 +1,24 @@ ;; Test TypeBuilder Before setting heap types: -$sig => (; temp ;) (func) -$struct => (; temp ;) (func) -$array => (; temp ;) (func) +$sig => (type $0 (; temp ;) (func)) +$struct => (type $1 (; temp ;) (func)) +$array => (type $2 (; temp ;) (func)) (ref $sig) => (; temp ;) (ref $0) (ref $struct) => (; temp ;) (ref $1) (ref $array) => (; temp ;) (ref $2) (ref null $array) => (; temp ;) (ref null $2) After setting heap types: -$sig => (; temp ;) (func (param (; temp ;) (ref $1)) (result (; temp ;) (ref $2) i32)) -$struct => (; temp ;) (struct (field (; temp ;) (ref null $2))) -$array => (; temp ;) (array (mut anyref)) +$sig => (type $0 (; temp ;) (func (param (; temp ;) (ref $1)) (result (; temp ;) (ref $2) i32))) +$struct => (type $1 (; temp ;) (struct (field (; temp ;) (ref null $2)))) +$array => (type $2 (; temp ;) (array (mut anyref))) (ref $sig) => (; temp ;) (ref $0) (ref $struct) => (; temp ;) (ref $1) (ref $array) => (; temp ;) (ref $2) (ref null $array) => (; temp ;) (ref null $2) After building types: -$sig => (func (param (ref $1)) (result (ref $2) i32)) -$struct => (struct (field (ref null $2))) -$array => (array (mut anyref)) +$sig => (type $0 (func (param (ref $1)) (result (ref $2) i32))) +$struct => (type $1 (struct (field (ref null $2)))) +$array => (type $2 (array (mut anyref))) (ref $sig) => (ref $0) (ref $struct) => (ref $1) (ref $array) => (ref $2) @@ -27,49 +27,49 @@ $array => (array (mut anyref)) ;; Test basic ;; Test canonical signatures ;; Test recursive types -(func (result (ref null $0))) +(type $0 (func (result (ref null $0)))) -(func (result (ref null $1))) -(func (result (ref null $0))) +(type $0 (func (result (ref null $1)))) +(type $1 (func (result (ref null $0)))) -(func (result (ref null $1))) -(func (result (ref null $2))) -(func (result (ref null $3))) -(func (result (ref null $4))) -(func (result (ref null $0))) +(type $0 (func (result (ref null $1)))) +(type $1 (func (result (ref null $2)))) +(type $2 (func (result (ref null $3)))) +(type $3 (func (result (ref null $4)))) +(type $4 (func (result (ref null $0)))) -(func (result (ref null $0) (ref null $2))) -(func (result (ref null $1) (ref null $3))) -(func) -(func) -(func (result (ref null $0))) -(func (result (ref null $1))) +(type $0 (func (result (ref null $0) (ref null $2)))) +(type $1 (func (result (ref null $1) (ref null $3)))) +(type $2 (func)) +(type $3 (func)) +(type $4 (func (result (ref null $0)))) +(type $5 (func (result (ref null $1)))) -(func (result (ref null $0))) -(func (result (ref null $0))) +(type $0 (func (result (ref null $0)))) +(type $1 (func (result (ref null $0)))) ;; Test subtyping ;; Test TypeBuilder Before setting heap types: -$sig => (; temp ;) (func) -$struct => (; temp ;) (func) -$array => (; temp ;) (func) +$sig => (type $0 (; temp ;) (func)) +$struct => (type $1 (; temp ;) (func)) +$array => (type $2 (; temp ;) (func)) (ref $sig) => (; temp ;) (ref $0) (ref $struct) => (; temp ;) (ref $1) (ref $array) => (; temp ;) (ref $2) (ref null $array) => (; temp ;) (ref null $2) After setting heap types: -$sig => (; temp ;) (func (param (; temp ;) (ref $1)) (result (; temp ;) (ref $2) i32)) -$struct => (; temp ;) (struct (field (; temp ;) (ref null $2))) -$array => (; temp ;) (array (mut anyref)) +$sig => (type $0 (; temp ;) (func (param (; temp ;) (ref $1)) (result (; temp ;) (ref $2) i32))) +$struct => (type $1 (; temp ;) (struct (field (; temp ;) (ref null $2)))) +$array => (type $2 (; temp ;) (array (mut anyref))) (ref $sig) => (; temp ;) (ref $0) (ref $struct) => (; temp ;) (ref $1) (ref $array) => (; temp ;) (ref $2) (ref null $array) => (; temp ;) (ref null $2) After building types: -$sig => (func (param (ref $1)) (result (ref $2) i32)) -$struct => (struct (field (ref null $2))) -$array => (array (mut anyref)) +$sig => (type $0 (func (param (ref $1)) (result (ref $2) i32))) +$struct => (type $1 (struct (field (ref null $2)))) +$array => (type $2 (array (mut anyref))) (ref $sig) => (ref $0) (ref $struct) => (ref $1) (ref $array) => (ref $2) @@ -78,25 +78,25 @@ $array => (array (mut anyref)) ;; Test basic ;; Test canonical signatures ;; Test recursive types -(func (result (ref null $0))) +(type $0 (func (result (ref null $0)))) -(func (result (ref null $1))) -(func (result (ref null $0))) +(type $0 (func (result (ref null $1)))) +(type $1 (func (result (ref null $0)))) -(func (result (ref null $1))) -(func (result (ref null $2))) -(func (result (ref null $3))) -(func (result (ref null $4))) -(func (result (ref null $0))) +(type $0 (func (result (ref null $1)))) +(type $1 (func (result (ref null $2)))) +(type $2 (func (result (ref null $3)))) +(type $3 (func (result (ref null $4)))) +(type $4 (func (result (ref null $0)))) -(func (result (ref null $0) (ref null $2))) -(func (result (ref null $1) (ref null $3))) -(func) -(func) -(func (result (ref null $0))) -(func (result (ref null $1))) +(type $0 (func (result (ref null $0) (ref null $2)))) +(type $1 (func (result (ref null $1) (ref null $3)))) +(type $2 (func)) +(type $3 (func)) +(type $4 (func (result (ref null $0)))) +(type $5 (func (result (ref null $1)))) -(func (result (ref null $0))) -(func (result (ref null $0))) +(type $0 (func (result (ref null $0)))) +(type $1 (func (result (ref null $0)))) ;; Test subtyping diff --git a/test/example/type-builder.txt b/test/example/type-builder.txt index 6d584e7be..b0cff3cc0 100644 --- a/test/example/type-builder.txt +++ b/test/example/type-builder.txt @@ -1,54 +1,54 @@ ;; Test canonicalization ;; Test basic ;; Test recursive types -(func (result (ref null $0))) +(type $0 (func (result (ref null $0)))) -(func (result (ref null $1))) -(func (result (ref null $0))) +(type $0 (func (result (ref null $1)))) +(type $1 (func (result (ref null $0)))) -(func (result (ref null $1))) -(func (result (ref null $2))) -(func (result (ref null $3))) -(func (result (ref null $4))) -(func (result (ref null $0))) +(type $0 (func (result (ref null $1)))) +(type $1 (func (result (ref null $2)))) +(type $2 (func (result (ref null $3)))) +(type $3 (func (result (ref null $4)))) +(type $4 (func (result (ref null $0)))) -(func) -(func) -(func (result (ref null $0) (ref null $2))) -(func (result (ref null $0) (ref null $3))) -(func (result (ref null $2))) -(func (result (ref null $3))) +(type $0 (func)) +(type $0 (func)) +(type $2 (func (result (ref null $0) (ref null $2)))) +(type $3 (func (result (ref null $0) (ref null $3)))) +(type $4 (func (result (ref null $2)))) +(type $5 (func (result (ref null $3)))) -(func (result (ref null $0))) -(func (result (ref null $0))) +(type $0 (func (result (ref null $0)))) +(type $1 (func (result (ref null $0)))) any -(func (param anyref) (result (ref null $1))) +(type $1 (func (param anyref) (result (ref null $1)))) ;; Test canonicalization ;; Test basic ;; Test recursive types -(func (result (ref null $0))) +(type $0 (func (result (ref null $0)))) -(func (result (ref null $1))) -(func (result (ref null $0))) +(type $0 (func (result (ref null $1)))) +(type $1 (func (result (ref null $0)))) -(func (result (ref null $1))) -(func (result (ref null $2))) -(func (result (ref null $3))) -(func (result (ref null $4))) -(func (result (ref null $0))) +(type $0 (func (result (ref null $1)))) +(type $1 (func (result (ref null $2)))) +(type $2 (func (result (ref null $3)))) +(type $3 (func (result (ref null $4)))) +(type $4 (func (result (ref null $0)))) -(func) -(func) -(func (result (ref null $0) (ref null $2))) -(func (result (ref null $0) (ref null $3))) -(func (result (ref null $2))) -(func (result (ref null $3))) +(type $0 (func)) +(type $0 (func)) +(type $2 (func (result (ref null $0) (ref null $2)))) +(type $3 (func (result (ref null $0) (ref null $3)))) +(type $4 (func (result (ref null $2)))) +(type $5 (func (result (ref null $3)))) -(func (result (ref null $0))) -(func (result (ref null $0))) +(type $0 (func (result (ref null $0)))) +(type $1 (func (result (ref null $0)))) any -(func (param anyref) (result (ref null $1))) +(type $1 (func (param anyref) (result (ref null $1)))) diff --git a/test/example/typeinfo.txt b/test/example/typeinfo.txt index 7015e6cfc..a20fc2bfa 100644 --- a/test/example/typeinfo.txt +++ b/test/example/typeinfo.txt @@ -12,8 +12,8 @@ i31 i31ref (ref i31) (func) -(struct) -(array i32) +(type $struct.0 (struct)) +(type $array.0 (array i32)) ;; Signature (func) |