mypy
8577ea4c - [mypyc] Add LoadGlobal IR (#8973)

Commit
6 years ago
[mypyc] Add LoadGlobal IR (#8973) In this PR we introduce a LoadGlobal IR that loads a name in global space. It's part of mypyc/mypyc#736 and mypyc/mypyc#737, it replaces literal LoadStatic with LoadGlobal and moves the name generation logic to caller in irbuild. It will eventually replace LoadStatic. LoadGlobal simply reads a global value via a given name (its counterpart for reading an address will be a future LoadAddress). This PR also introduces a registry and a description for making LoadGlobal work with more customized loading ops (some name_ref_ops like the True and False).
Author
Parents
Loading