Skip to content

Commit

Permalink
Expand docs for FuncEnvironment::heaps trait method
Browse files Browse the repository at this point in the history
  • Loading branch information
fitzgen committed Dec 14, 2022
1 parent b4e5939 commit e43385e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cranelift/wasm/src/environ/spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,12 @@ pub trait FuncEnvironment: TargetEnvironment {
) -> WasmResult<GlobalVariable>;

/// Get the heaps for this function environment.
///
/// The returned map should provide heap format details (encoded in
/// `HeapData`) for each `Heap` that was previously returned by
/// `make_heap()`. The translator will first call make_heap for each Wasm
/// memory, and then later when translating code, will invoke `heaps()` to
/// learn how to access the environment's implementation of each memory.
fn heaps(&self) -> &PrimaryMap<Heap, HeapData>;

/// Set up the necessary preamble definitions in `func` to access the linear memory identified
Expand Down

0 comments on commit e43385e

Please sign in to comment.