Skip to content

Commit

Permalink
Document the culprit of disas expect tests diversion (bytecodeallianc…
Browse files Browse the repository at this point in the history
…e#134)

This commit adds a comment to `crates/cranelift/src/func_environ.rs` to
document that the hack in `before_translate_function` is the culprit of
the disas expect test diversion.
  • Loading branch information
dhil authored Mar 19, 2024
1 parent be9a2e5 commit c113ff9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions crates/cranelift/src/func_environ.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2877,6 +2877,12 @@ impl<'module_environment> cranelift_wasm::FuncEnvironment for FuncEnvironment<'m
// will remove it. However, it would be nicer to check if the
// function actually contains resume instructions, and only run
// `declare_vmruntime_limits_ptr` then.
//
// TODO(dhil): FIXME emission of the vmruntime_limits_ptr
// affects codegen of non-wasmfx programs, causing CLIF
// output expectation tests (disas) to diverge from
// upstream. We should come up with a design that let us
// emit this pointer only when necessary.
self.declare_vmruntime_limits_ptr(builder);
}
// Additionally we initialize `fuel_var` if it will get used.
Expand Down

0 comments on commit c113ff9

Please sign in to comment.