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

Preserve pointer provenance in the Rust backend. #870

Merged

Commits on Feb 27, 2024

  1. Preserve pointer provenance in the Rust backend.

    Use the new `Pointer` and `Length` types in the Rust backend to emit
    code that uses `*mut c_void` and `usize` instead of `i32` when working
    with pointers and array lengths.
    
    To represent `PointerOrI64`, use a `MaybeUninit<u64>`, since that type
    can hold any `u64` and is documented to also preserve provenance.
    
    This change happens to get the generated Rust code close to supporting
    memory64, however it isn't complete; the abi code still emits hard-coded
    `+ 4` offsets for loading the length of a pointer+length pair in memory.
    sunfishcode committed Feb 27, 2024
    Configuration menu
    Copy the full SHA
    407e94a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d2327ab View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    7fdf8ca View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    8427d4a View commit details
    Browse the repository at this point in the history
  5. Use *mut u8 instead of *mut c_void for pointers.

    And switch to `add` from `byte_add`.
    sunfishcode committed Feb 27, 2024
    Configuration menu
    Copy the full SHA
    d295a51 View commit details
    Browse the repository at this point in the history

Commits on Feb 28, 2024

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