summaryrefslogtreecommitdiff
path: root/test/lit/passes/optimize-instructions-iit-eh.wast
diff options
context:
space:
mode:
authorThomas Lively <7121787+tlively@users.noreply.github.com>2022-08-04 17:05:54 -0700
committerGitHub <noreply@github.com>2022-08-05 00:05:54 +0000
commit6759371b5239efa3daa9d988455abdd14a8b18ca (patch)
tree0c3a3e371ed742bdbd790f7344ec86e8536bc167 /test/lit/passes/optimize-instructions-iit-eh.wast
parent9534e6927c41f4a6a5d06d58d00c271c9f066e9a (diff)
downloadbinaryen-6759371b5239efa3daa9d988455abdd14a8b18ca.tar.gz
binaryen-6759371b5239efa3daa9d988455abdd14a8b18ca.tar.bz2
binaryen-6759371b5239efa3daa9d988455abdd14a8b18ca.zip
Remove RTTs (#4848)
RTTs were removed from the GC spec and if they are added back in in the future, they will be heap types rather than value types as in our implementation. Updating our implementation to have RTTs be heap types would have been more work than deleting them for questionable benefit since we don't know how long it will be before they are specced again.
Diffstat (limited to 'test/lit/passes/optimize-instructions-iit-eh.wast')
-rw-r--r--test/lit/passes/optimize-instructions-iit-eh.wast29
1 files changed, 6 insertions, 23 deletions
diff --git a/test/lit/passes/optimize-instructions-iit-eh.wast b/test/lit/passes/optimize-instructions-iit-eh.wast
index b297cb7df..ee6b78738 100644
--- a/test/lit/passes/optimize-instructions-iit-eh.wast
+++ b/test/lit/passes/optimize-instructions-iit-eh.wast
@@ -5,33 +5,17 @@
(module
;; CHECK: (type $struct.A (struct (field i32)))
(type $struct.A (struct i32))
- ;; CHECK: (global $g-struct.A (rtt $struct.A) (rtt.canon $struct.A))
-
;; CHECK: (tag $e (param (ref null $struct.A)))
(tag $e (param (ref null $struct.A)))
- (global $g-struct.A (rtt $struct.A) (rtt.canon $struct.A))
;; CHECK: (func $ref-cast-statically-removed
- ;; CHECK-NEXT: (local $0 (ref null $struct.A))
- ;; CHECK-NEXT: (local $1 (ref null $struct.A))
;; CHECK-NEXT: (try $try
;; CHECK-NEXT: (do
;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; CHECK-NEXT: (catch $e
- ;; CHECK-NEXT: (local.set $1
- ;; CHECK-NEXT: (pop (ref null $struct.A))
- ;; CHECK-NEXT: )
;; CHECK-NEXT: (throw $e
- ;; CHECK-NEXT: (block (result (ref null $struct.A))
- ;; CHECK-NEXT: (local.set $0
- ;; CHECK-NEXT: (local.get $1)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (drop
- ;; CHECK-NEXT: (global.get $g-struct.A)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (local.get $0)
- ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (pop (ref null $struct.A))
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
@@ -41,15 +25,14 @@
(do)
(catch $e
(throw $e
- ;; Because --ignore-implicit-traps is given, this ref.cast is assumed
- ;; not to throw so this ref.cast can be statically removed. But that
- ;; creates a block around this, making 'pop' nested into it, which is
- ;; invalid. We fix this up at the end up OptimizeInstruction,
+ ;; Because --ignore-implicit-traps is given, this ref.cast_static is
+ ;; assumed not to throw so this ref.cast can be statically removed.
+ ;; But that creates a block around this, making 'pop' nested into it,
+ ;; which is invalid. We fix this up at the end up OptimizeInstruction,
;; assigning the 'pop' to a local at the start of this 'catch' body
;; and later using 'local.get' to get it.
- (ref.cast
+ (ref.cast_static $struct.A
(pop (ref null $struct.A))
- (global.get $g-struct.A)
)
)
)