(op: CallC)
| 44 | |
| 45 | |
| 46 | def get_load_global_name(op: CallC) -> str | None: |
| 47 | name = op.function_name |
| 48 | if name == "CPyDict_GetItem": |
| 49 | arg = op.args[0] |
| 50 | if ( |
| 51 | isinstance(arg, LoadStatic) |
| 52 | and arg.namespace == "static" |
| 53 | and arg.identifier == "globals" |
| 54 | and isinstance(op.args[1], LoadLiteral) |
| 55 | ): |
| 56 | return str(op.args[1].value) |
| 57 | return None |
| 58 | |
| 59 | |
| 60 | # These primitives perform an implicit IncRef for the return value. Only some of the most common ones |
no test coverage detected
searching dependent graphs…