Skip to content
Commit 3e9881b9 authored by Heejin Ahn's avatar Heejin Ahn
Browse files

[WebAssembly] Handle block-like structures consistently in type checker

We disable type check in unreachable code, but when the unreachable code
is enclosed within a block-like structure, the block as a whole has a
valid type and we should continue type checking after the block. But it
looks we currently only do that for blocks and not other block-like
structures (`loop`s, `try`s, and `if`s). Also unreachable code within
`if`'s true body shouldn't disable type checking in `else` body, and
that in `try` body shouldn't disable type checking in `catch/catch_all`
body.

This also causes the values/types on the stack to be correctly checked
when encounterint `catch`, `catch_all`, and `delegate`.

Reviewed By: dschuff

Differential Revision: https://reviews.llvm.org/D147852
parent 8c0798f3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment