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

Refactor accumulators #575

Merged
merged 7 commits into from
Sep 22, 2024

Commits on Sep 16, 2024

  1. allocate values in a closure

    This will allow us to store the id
    in the struct itself.
    nikomatsakis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    34a8edb View commit details
    Browse the repository at this point in the history
  2. change disambiguator_map to FxHashMap

    There is no need for IndexMap here,
    we don't iterate or care about indices.
    nikomatsakis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    d7df2cd View commit details
    Browse the repository at this point in the history
  3. remove read of "entity table"

    We used to have the concept of "resetting"
    a tracked struct, which removed all instances.
    We don't have that concept anymore.
    Therefore we don't need to record a read on the
    tracked struct table itself.
    nikomatsakis committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    2528045 View commit details
    Browse the repository at this point in the history

Commits on Sep 21, 2024

  1. refactor extend_memo_lifetime to return memo

    This is a step towards refactoring `fetch`
    to return the memo itself and not the value.
    nikomatsakis committed Sep 21, 2024
    Configuration menu
    Copy the full SHA
    dcb0eb2 View commit details
    Browse the repository at this point in the history
  2. return lifetime-extended memo, not value

    Change the core operation to be `refresh_memo`.
    This is a nice refactoring on its own but it
    will also support the refactoring of how
    we manage accumulator values.
    nikomatsakis committed Sep 21, 2024
    Configuration menu
    Copy the full SHA
    2caa5cc View commit details
    Browse the repository at this point in the history
  3. rework accumulator to store values in memos

    We used to store values in a central map,
    but now each memo has an `AccumulatorMap`
    that maps accumulated values (if any).
    
    The primary goals of this change are
    
    * forward compatible with speculative execution
      because it puts more data into tables;
    * step towards a refactoring to stop tracking
      outputs in the same array as inputs and thus
      to simplify how we do versioning. We will no
      longer need to walk the function's outputs
      and refresh their versions and so forth because
      they are stored in the function memo and so
      they get refreshed automatically when the memo
      is refreshed.
    nikomatsakis committed Sep 21, 2024
    Configuration menu
    Copy the full SHA
    3687e48 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    b5af1d8 View commit details
    Browse the repository at this point in the history