Skip to content

Commit

Permalink
fix: assertions for wasm target (#1109)
Browse files Browse the repository at this point in the history
  • Loading branch information
guybedford authored Jul 7, 2023
1 parent 1d71d2f commit 6dae59e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion crates/wast/src/core/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1156,7 +1156,7 @@ instructions! {
const _: () = {
let size = std::mem::size_of::<Instruction<'_>>();
let pointer = std::mem::size_of::<usize>();
assert!(size <= pointer * 10);
assert!(size <= pointer * 20);
};

impl<'a> Instruction<'a> {
Expand Down
2 changes: 1 addition & 1 deletion crates/wast/src/lexer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ pub struct Token {
}

const _: () = {
assert!(std::mem::size_of::<Token>() <= std::mem::size_of::<usize>() * 2);
assert!(std::mem::size_of::<Token>() <= std::mem::size_of::<usize>() * 4);
};

/// Classification of what was parsed from the input stream.
Expand Down

0 comments on commit 6dae59e

Please sign in to comment.