This function is used at the end of unreachable code handling to determine if the reachability status should be updated.
(&self)
| 1018 | /// This function is used at the end of unreachable code handling |
| 1019 | /// to determine if the reachability status should be updated. |
| 1020 | pub fn is_next_sequence_reachable(&self) -> bool { |
| 1021 | use ControlStackFrame::*; |
| 1022 | |
| 1023 | match self { |
| 1024 | // For if/else, the reachability of the next sequence is determined |
| 1025 | // by the reachability state at the start of the block. An else |
| 1026 | // block will be reachable if the if block is also reachable at |
| 1027 | // entry. |
| 1028 | If { reachable, .. } | Else { reachable, .. } => *reachable, |
| 1029 | // For blocks, the reachability of the next sequence is determined |
| 1030 | // if they're a branch target. |
| 1031 | Block { |
| 1032 | is_branch_target, .. |
| 1033 | } => *is_branch_target, |
| 1034 | // Loops are not used for reachability analysis, |
| 1035 | // given that they don't have exit branches. |
| 1036 | Loop { .. } => false, |
| 1037 | } |
| 1038 | } |
| 1039 | |
| 1040 | /// Returns a reference to the [StackState] of the block. |
| 1041 | pub fn stack_state(&self) -> &StackState { |
no outgoing calls
no test coverage detected