Skip to content

Commit

Permalink
Optimize side table masks (#713)
Browse files Browse the repository at this point in the history
Based on experiments, these are the smallest masks to pass CI. In other
words, `SideTableEntry` only requires `u35` at this point. I'll add the
fields from `func_type()` and `func()` in `module.rs` to the side table
in #711, and `SideTableEntry` as `u64` might not be sufficient.

#46

---------

Co-authored-by: Zhou Fang <[email protected]>
  • Loading branch information
zhouwfang and zhouwfang authored Jan 3, 2025
1 parent a877f75 commit b9de9e9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/interpreter/src/side_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ pub struct SideTableEntryView {

impl SideTableEntry {
const DELTA_IP_MASK: u64 = 0xffff;
const DELTA_STP_MASK: u64 = 0xffff << 16;
const VAL_CNT_MASK: u64 = 0xffff << 32;
const POP_CNT_MASK: u64 = 0xffff << 48;
const DELTA_STP_MASK: u64 = 0x7fff << 16;
const VAL_CNT_MASK: u64 = 0x3 << 31;
const POP_CNT_MASK: u64 = 0x3 << 33;

pub fn new(view: SideTableEntryView) -> Result<Self, Error> {
let mut fields = 0;
Expand Down

0 comments on commit b9de9e9

Please sign in to comment.