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 the internals of vm::Memory to simplify the RuntimeLinearMemory trait #9577

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Commits on Nov 6, 2024

  1. Refactor internals of vm::Memory

    Instead of storing just a trait object store instead an `enum` between
    "local" memory and shared memory. This helps remove redundant trait
    impls on shared memories, removes the need for `dyn Any`, and removes
    the possibility of wrapping a shared memory as a shared memory. This is
    additionally intended to make it a bit easier to see what's nested where
    and reduce some layers of indirection.
    alexcrichton committed Nov 6, 2024
    Configuration menu
    Copy the full SHA
    d1481d2 View commit details
    Browse the repository at this point in the history
  2. Start implementing a LocalMemory abstraction

    This is intended to be a non-shared implementation of a linear memory
    with various bits and pieces tracking state. The end goal is to simplify
    the `RuntimeLinearMemory` trait to its bare bones necessary to
    faithfully implement wasm linear memory.
    alexcrichton committed Nov 6, 2024
    Configuration menu
    Copy the full SHA
    4c5efc8 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    318c777 View commit details
    Browse the repository at this point in the history
  4. Move CoW/max limits into LocalMemory

    Further simplify `RuntimeLinearMemory` by moving these responsibilities
    up a layer into the `LocalMemory` structure.
    alexcrichton committed Nov 6, 2024
    Configuration menu
    Copy the full SHA
    e765ed7 View commit details
    Browse the repository at this point in the history
  5. Simplify memory_may_move handling in LocalMemory

    No need to plumb it through all the traits any more. Now it's possible
    to only have it handled in `LocalMemory` and other pieces don't have to
    worry about it.
    alexcrichton committed Nov 6, 2024
    Configuration menu
    Copy the full SHA
    40869a8 View commit details
    Browse the repository at this point in the history
  6. Move wasm_accessible into LocalMemory

    Further simplify custom traits and mmap/static memory by moving more
    responsibility into `LocalMemory`.
    alexcrichton committed Nov 6, 2024
    Configuration menu
    Copy the full SHA
    e0e3a0d View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    6bf89b6 View commit details
    Browse the repository at this point in the history
  8. Fix some CI failures

    alexcrichton committed Nov 6, 2024
    Configuration menu
    Copy the full SHA
    ecf99ca View commit details
    Browse the repository at this point in the history
  9. Handle more CI failures

    alexcrichton committed Nov 6, 2024
    Configuration menu
    Copy the full SHA
    a6dbf02 View commit details
    Browse the repository at this point in the history
  10. More fixes for CI

    alexcrichton committed Nov 6, 2024
    Configuration menu
    Copy the full SHA
    cce24de View commit details
    Browse the repository at this point in the history