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

Canonicalize IR to disallow throwing GlobalRef in value position #36450

Merged
merged 1 commit into from
Jun 29, 2020

Commits on Jun 26, 2020

  1. Canonicalize IR to disallow throwing GlobalRef in value position

    In anticipation of making the SSA IR more of an interface
    that packages can use to implement custom compiler transformation,
    I'd like to do some cleanup first. The is the first of the items
    on my list: Disallowing GlobalRef in value position if it could
    potentially throw (because the binding doesn't exist yet).
    
    This is done as part of SSA conversion, because we don't know
    whether a binding will exist during parsing/lowering and we
    don't modify the IR at all between lowering and the end of
    type inference, so doing it during SSA conversion is the first
    possible opportunity.
    
    The reason to do this is to simplify transformation passes that
    want to replace calls with sequences of other instructions. By
    moving those GlobalRef that could potentially throw into statement
    position, the order of argument evaluation does not matter (this
    isn't quite true yet due to static parameters, but I'd like to
    fix that in a separate commit). I think that's a desirable property
    to simplify the life os pass authors.
    Keno committed Jun 26, 2020
    Configuration menu
    Copy the full SHA
    7fe2e25 View commit details
    Browse the repository at this point in the history