diff options
author | Thomas Lively <7121787+tlively@users.noreply.github.com> | 2022-08-17 22:51:27 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-17 22:51:27 -0700 |
commit | 2d86d1f8fb217456d8bcc4b401ce7d143aa36ee9 (patch) | |
tree | ec852da20ed85c7e5f9be7a5e3fb0632d7caf949 /test/lit/passes/optimize-instructions-gc.wast | |
parent | 3aff4c6e85623c970280219c6699a66bc9de5f9b (diff) | |
download | binaryen-2d86d1f8fb217456d8bcc4b401ce7d143aa36ee9.tar.gz binaryen-2d86d1f8fb217456d8bcc4b401ce7d143aa36ee9.tar.bz2 binaryen-2d86d1f8fb217456d8bcc4b401ce7d143aa36ee9.zip |
Restore the `extern` heap type (#4898)
The GC proposal has split `any` and `extern` back into two separate types, so
reintroduce `HeapType::ext` to represent `extern`. Before it was originally
removed in #4633, externref was a subtype of anyref, but now it is not. Now that
we have separate heaptype type hierarchies, make `HeapType::getLeastUpperBound`
fallible as well.
Diffstat (limited to 'test/lit/passes/optimize-instructions-gc.wast')
-rw-r--r-- | test/lit/passes/optimize-instructions-gc.wast | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/lit/passes/optimize-instructions-gc.wast b/test/lit/passes/optimize-instructions-gc.wast index f6a1b5d09..7a0eea294 100644 --- a/test/lit/passes/optimize-instructions-gc.wast +++ b/test/lit/passes/optimize-instructions-gc.wast @@ -47,37 +47,37 @@ ;; These functions test if an `if` with subtyped arms is correctly folded ;; 1. if its `ifTrue` and `ifFalse` arms are identical (can fold) ;; CHECK: (func $if-arms-subtype-fold (result anyref) - ;; CHECK-NEXT: (ref.null any) + ;; CHECK-NEXT: (ref.null eq) ;; CHECK-NEXT: ) ;; NOMNL: (func $if-arms-subtype-fold (type $none_=>_anyref) (result anyref) - ;; NOMNL-NEXT: (ref.null any) + ;; NOMNL-NEXT: (ref.null eq) ;; NOMNL-NEXT: ) (func $if-arms-subtype-fold (result anyref) (if (result anyref) (i32.const 0) - (ref.null extern) - (ref.null extern) + (ref.null eq) + (ref.null eq) ) ) ;; 2. if its `ifTrue` and `ifFalse` arms are not identical (cannot fold) ;; CHECK: (func $if-arms-subtype-nofold (result anyref) ;; CHECK-NEXT: (if (result anyref) ;; CHECK-NEXT: (i32.const 0) - ;; CHECK-NEXT: (ref.null any) + ;; CHECK-NEXT: (ref.null eq) ;; CHECK-NEXT: (ref.null func) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; NOMNL: (func $if-arms-subtype-nofold (type $none_=>_anyref) (result anyref) ;; NOMNL-NEXT: (if (result anyref) ;; NOMNL-NEXT: (i32.const 0) - ;; NOMNL-NEXT: (ref.null any) + ;; NOMNL-NEXT: (ref.null eq) ;; NOMNL-NEXT: (ref.null func) ;; NOMNL-NEXT: ) ;; NOMNL-NEXT: ) (func $if-arms-subtype-nofold (result anyref) (if (result anyref) (i32.const 0) - (ref.null extern) + (ref.null eq) (ref.null func) ) ) |