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

Introduce a new core pass called sys_core_alias #1080

Merged
merged 1 commit into from Jul 7, 2017

Commits on Jul 6, 2017

  1. Introduce a new core pass called sys_core_alias

    The goal of this pass is to find values that are built from
    patterns and generate aliases for those values to remove
    pressure from the GC. For example, this code:
    
       example({ok, Val}) ->
           {ok, Val}.
    
    shall become:
    
       example({ok, Val} = Tuple) ->
           Tuple.
    
    Currently this pass aliases tuple and cons nodes made of literals,
    variables and other cons. The tuple/cons may appear anywhere in the
    pattern and it will be aliased if used later on.
    
    Notice a tuple/cons made only of literals is not aliased as it may
    be part of the literal pool.
    José Valim committed Jul 6, 2017
    Copy the full SHA
    d4a27e9 View commit details
    Browse the repository at this point in the history