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

remove sub-env and move locals rewrite to a separate pass #222

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Jul 25, 2021

  1. use one env for all symbols

    The approach of creating child environment comes from the time where CPS
    has to manually track scope. Nowadays we use the information that is in
    the AST itself, so this is no longer necessary.
    alaviss committed Jul 25, 2021
    Configuration menu
    Copy the full SHA
    87fde14 View commit details
    Browse the repository at this point in the history
  2. collect all locals in annotate then rewrite them after

    Since we are now storing all locals in a single `Env`, we can move the
    locals to env rewrite outside of annotate, which saves us a lot of
    processing time (due to reduced re-iteration of the same ast).
    
    Testing with cpstest shows a compile-time reduction from 74.760s to
    50.019s (33% improvement).
    alaviss committed Jul 25, 2021
    Configuration menu
    Copy the full SHA
    b796bbb View commit details
    Browse the repository at this point in the history