luaur-common 0.1.3

Foundational data structures and flags for the luaur Luau-in-Rust toolchain.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::enums::luau_opcode::LuauOpcode;

#[allow(non_snake_case)]
pub fn isFastCall(op: LuauOpcode) -> bool {
    match op {
        LuauOpcode::LOP_FASTCALL
        | LuauOpcode::LOP_FASTCALL1
        | LuauOpcode::LOP_FASTCALL2
        | LuauOpcode::LOP_FASTCALL2K
        | LuauOpcode::LOP_FASTCALL3 => true,

        _ => false,
    }
}

pub fn is_fast_call(op: LuauOpcode) -> bool {
    isFastCall(op)
}