Introduce .try {} .catch {} hhas directives
Summary:
The .try_catch {} hhas directive does not encode the length of catch blocks,
preventing catch blocks from being emitted inside open FPI blocks, which are
needed for migration of faults to catches.
Let's introduce .try {} .catch {} directive, so that we can eventually mark the
catch blocks as top-level inside the FPI table.
.try {} blocks are required to not fall-thru, .catch {} blocks implicitly
encode the Catch opcode as their first statement.
The support is added to all places that read hhas (as.cpp and hhas_parser) and
some places that emits hhas (hhcodegen and all manually written hhas files).
The disas.cpp still emits the original .try_catch {} for two reasons:
- hhbbc may rearrange blocks such that m_past != m_handler
- EH table does not yet contain information about length of catch blocks
Reviewed By: paulbiss
Differential Revision:
D5049855
fbshipit-source-id:
268b190c4c5228f7387a732cfe7db527fbfb7c37