luaur-bytecode 0.1.3

Luau bytecode format and builder (Rust).
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::records::bc_inst_hash::BcInstHash;

impl BcInstHash {
    pub fn mix_u32_u32(mut h: u32, mut k: u32) -> u32 {
        // MurmurHash2 step
        k = k.wrapping_mul(Self::M);
        k ^= k >> Self::R;
        k = k.wrapping_mul(Self::M);

        h = h.wrapping_mul(Self::M);
        h ^= k;

        h
    }
}