This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Correctly check end_if/end_try with else/catch
ClosedPublic

Authored by aheejin on Apr 9 2023, 4:37 AM.

Details

Summary

When we encounter an else, catch, or catch_all, we currently just
push the structure NestingType and don't preserve the original if
and try's signature. So after we pass else/catch/catch_all, we
can't check if the values on stack have the correct types when we
encounter end_if or end_try. This CL fixes the issue, and modifies
the existing test to be correct (some of them had try without
catch).

Diff Detail

Unit TestsFailed

Event Timeline

aheejin created this revision.Apr 9 2023, 4:37 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 9 2023, 4:37 AM
aheejin requested review of this revision.Apr 9 2023, 4:37 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 9 2023, 4:37 AM
aheejin updated this revision to Diff 511988.Apr 9 2023, 4:51 AM

Small cosmetic fix

aheejin updated this revision to Diff 512006.Apr 9 2023, 7:39 AM

Rename a function

dschuff accepted this revision.Apr 10 2023, 5:27 PM
This revision is now accepted and ready to land.Apr 10 2023, 5:27 PM