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

Methods for getting indices and making loads and stores #500

Merged
merged 3 commits into from
Oct 4, 2022
Merged

Methods for getting indices and making loads and stores #500

merged 3 commits into from
Oct 4, 2022

Commits on Oct 3, 2022

  1. Methods for getting indices and making loads and stores

    Adds these extension methods on CodeInstruction:
    
    - LocalIndex, which returns the operand of any ldloc/ldloca/stloc, even
      the short forms or the fixed forms (i.e. ldloc.s or ldloc.1)
    
    - ArgIndex, which does the same but for ldarg/ldarga/starg
    
    Adds these static helper methods to CodeInstruction:
    
    - LoadLocal, which allows you to produce an optimal load from an index,
      optionally loading the address
    
    - StoreLocal, which allows you to produce an optional store to an index
    
    - LoadArg, which allows you to produce an optimal load from an argument,
      optionally loading the address
    
    - StoreArg, which allows you to produce an optimal store to an argument
    
    All of the methods are annotated with doc comments and include links to
    their counterparts via `<seealso>` references.
    LoganDark committed Oct 3, 2022
    Configuration menu
    Copy the full SHA
    beffadc View commit details
    Browse the repository at this point in the history
  2. CodeMatch helpers for matching loads and stores

    This adds four new static methods to CodeMatch:
    
    - LoadsLocal which matches any local load (ldloc family)
    - StoresLocal which matches any local store (stloc family)
    - LoadsArgument which matches any argument load (ldarg family)
    - StoresArgument which matches any argument store (starg family)
    
    Matching specific indices can be done with the predicate and checking
    the instruction LocalIndex or ArgIndex
    LoganDark committed Oct 3, 2022
    Configuration menu
    Copy the full SHA
    b951db5 View commit details
    Browse the repository at this point in the history

Commits on Oct 4, 2022

  1. Use the full "Argument" term in method names

    I'm having trouble getting feedback on this one but I think this is
    what we want?
    LoganDark committed Oct 4, 2022
    Configuration menu
    Copy the full SHA
    679408e View commit details
    Browse the repository at this point in the history