Skip to content

Commit

Permalink
add suggested test
Browse files Browse the repository at this point in the history
  • Loading branch information
tlively committed Dec 13, 2023
1 parent 7b628b6 commit c248799
Showing 1 changed file with 57 additions and 1 deletion.
58 changes: 57 additions & 1 deletion test/lit/wat-kitchen-sink.wast
Original file line number Diff line number Diff line change
Expand Up @@ -2124,6 +2124,62 @@
end
)

;; CHECK: (func $rethrow-try-nested (type $void)
;; CHECK-NEXT: (block $label
;; CHECK-NEXT: (try $__delegate__label
;; CHECK-NEXT: (do
;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; CHECK-NEXT: (catch $empty
;; CHECK-NEXT: (try
;; CHECK-NEXT: (do
;; CHECK-NEXT: (rethrow $__delegate__label)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
(func $rethrow-try-nested
try
catch $empty
block
try
;; Same as before, but now the rethrow is in the inner try instead of the
;; inner catch.
rethrow 2
end
end
end
)

;; CHECK: (func $rethrow-try-nested-named (type $void)
;; CHECK-NEXT: (block $l
;; CHECK-NEXT: (try $__delegate__l
;; CHECK-NEXT: (do
;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; CHECK-NEXT: (catch $empty
;; CHECK-NEXT: (try
;; CHECK-NEXT: (do
;; CHECK-NEXT: (rethrow $__delegate__l)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
(func $rethrow-try-nested-named
try $l
catch $empty
block
try
rethrow $l
end
end
end
)

;; CHECK: (func $label-siblings (type $void)
;; CHECK-NEXT: (block $l
;; CHECK-NEXT: (br $l)
Expand Down Expand Up @@ -3022,7 +3078,7 @@
(func $ref-func
ref.func $ref-func
drop
ref.func 133
ref.func 135
drop
)

Expand Down

0 comments on commit c248799

Please sign in to comment.