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

Add way to differentiate argument locals from other locals in Stable MIR #117095

Merged
merged 9 commits into from
Oct 26, 2023

Commits on Oct 25, 2023

  1. Add arg_count field to Body in Stable MIR

    This field allows SMIR consumers to identify which locals correspond to
    argument locals. It simply exposes the arg_count field from the MIR
    representation.
    klinvill committed Oct 25, 2023
    Configuration menu
    Copy the full SHA
    e4c41b0 View commit details
    Browse the repository at this point in the history
  2. Replace arg_count in public API with return/arg getters

    This commit hides the arg_count field in Body and instead exposes more
    stable and user-friendly methods to get the return and argument locals.
    As a result, Body instances must now be constructed using the `new`
    function.
    klinvill committed Oct 25, 2023
    Configuration menu
    Copy the full SHA
    93d1b3e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f4d80a5 View commit details
    Browse the repository at this point in the history
  4. Make locals field private

    klinvill committed Oct 25, 2023
    Configuration menu
    Copy the full SHA
    372c533 View commit details
    Browse the repository at this point in the history
  5. Add a public API to get all body locals

    This is particularly helpful for the ui tests, but also could be helpful
    for Stable MIR users who just want all the locals without needing to
    concatenate responses
    klinvill committed Oct 25, 2023
    Configuration menu
    Copy the full SHA
    39b293f View commit details
    Browse the repository at this point in the history
  6. Rename internal_locals to inner_locals

    The word internal has connotations about information that's not exposed.
    It's more accurate to say that the remaining locals apply only to the
    inner part of the function, so I'm renaming them to inner locals.
    klinvill committed Oct 25, 2023
    Configuration menu
    Copy the full SHA
    fe4dfb8 View commit details
    Browse the repository at this point in the history
  7. Update Place and Operand to take slices

    The latest locals() method in stable MIR returns slices instead of vecs.
    This commit also includes fixes to the existing tests that previously
    referenced the private locals field.
    klinvill committed Oct 25, 2023
    Configuration menu
    Copy the full SHA
    4b23bd4 View commit details
    Browse the repository at this point in the history
  8. Add test for smir locals

    klinvill committed Oct 25, 2023
    Configuration menu
    Copy the full SHA
    bac7d5b View commit details
    Browse the repository at this point in the history

Commits on Oct 26, 2023

  1. Configuration menu
    Copy the full SHA
    d55487d View commit details
    Browse the repository at this point in the history