Open pfalcon opened 5 years ago
Per https://github.com/pfalcon/python-compiler/issues/7#issuecomment-531453470, I switched working on my own bytecode compiler, written from scratch. I unlikely will work on this issue anytime soon, but leaving it open for possible interested parties.
Currently, it definitely doesn't work correctly. The implementation looks over-engineered - it seems to attempt to implement dataflow analysis over arbitrary CFG, which is absolutely great if it's implemented correctly and works. And if it doesn't, there's always suspicion about the implementation correctness. And Python compilers (CPython's and this) at the current level of optimization produce structured CFGs anyway, so dataflow analysis with "meet over all paths" isn't needed. Instead, structured recursive analysis should be enough (e.g., stack use of
if
is max of stack use of its branches + stack use of theif
itself).