(stmt: Stmt)
| 855 | |
| 856 | |
| 857 | def stmt_is_simple_exit(stmt: Stmt) -> bool: |
| 858 | if not isinstance(stmt, SimpleStmt): |
| 859 | return False |
| 860 | tokens = stmt.contents |
| 861 | if len(tokens) < 4: |
| 862 | return False |
| 863 | return ( |
| 864 | tokens[0].text in ("ERROR_IF", "DEOPT_IF", "EXIT_IF", "AT_END_EXIT_IF") |
| 865 | and |
| 866 | tokens[1].text == "(" |
| 867 | and |
| 868 | tokens[2].text in ("true", "1") |
| 869 | and |
| 870 | tokens[3].text == ")" |
| 871 | ) |
| 872 | |
| 873 | |
| 874 | def stmt_list_escapes(stmts: list[Stmt]) -> bool: |
no outgoing calls
no test coverage detected
searching dependent graphs…