Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revamp co_stacksize calculation #3

Open
pfalcon opened this issue Jan 30, 2019 · 1 comment
Open

Revamp co_stacksize calculation #3

pfalcon opened this issue Jan 30, 2019 · 1 comment

Comments

@pfalcon
Copy link
Owner

pfalcon commented Jan 30, 2019

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 the if itself).

@pfalcon
Copy link
Owner Author

pfalcon commented Jan 18, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant