-
Notifications
You must be signed in to change notification settings - Fork 293
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix
ref.is_null
translation constant propagation (#1189)
* fix ref.is_null translation const prop * add ValueStack::drop method * apply rustfmt * use ValueStack::drop where needed (fixes clippy)
- Loading branch information
Showing
4 changed files
with
42 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
use super::*; | ||
|
||
#[test] | ||
#[cfg_attr(miri, ignore)] | ||
fn const_prop() { | ||
let wasm = r" | ||
(module | ||
(func (result i32) | ||
ref.null func | ||
ref.is_null | ||
) | ||
) | ||
"; | ||
TranslationTest::from_wat(wasm) | ||
.expect_func_instrs([Instruction::return_imm32(1_i32)]) | ||
.run() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters