Skip to content

Revamp co_stacksize calculation #3

@pfalcon

Description

@pfalcon

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions