(inst: Instruction)
| 117 | |
| 118 | |
| 119 | def uses_this(inst: Instruction) -> bool: |
| 120 | if inst.properties.needs_this: |
| 121 | return True |
| 122 | for uop in inst.parts: |
| 123 | if not isinstance(uop, Uop): |
| 124 | continue |
| 125 | for cache in uop.caches: |
| 126 | if cache.name != "unused": |
| 127 | return True |
| 128 | # Can't be merged into the loop above, because |
| 129 | # this must strictly be performed at the end. |
| 130 | for uop in inst.parts: |
| 131 | if not isinstance(uop, Uop): |
| 132 | continue |
| 133 | for tkn in uop.body.tokens(): |
| 134 | if (tkn.kind == "IDENTIFIER" |
| 135 | and (tkn.text in {"DEOPT_IF", "EXIT_IF", "AT_END_EXIT_IF"})): |
| 136 | return True |
| 137 | return False |
| 138 | |
| 139 | |
| 140 | UNKNOWN_OPCODE_HANDLER ="""\ |
no test coverage detected
searching dependent graphs…