luaur-vm 0.1.3

The Luau register virtual machine and standard library (Rust).
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::iscollectable;
use crate::isdead;
use crate::ttype;
use luaur_common::LUAU_ASSERT;

#[allow(non_snake_case)]
#[macro_export]
macro_rules! checkliveness {
    ($g:expr, $obj:expr) => {
        luaur_common::LUAU_ASSERT!(
            !$crate::iscollectable!($obj)
                || (($crate::ttype!($obj) == (*(*$obj).value.gc).gch.tt as core::ffi::c_int)
                    && !$crate::isdead!($g, (*$obj).value.gc))
        )
    };
}

pub use checkliveness;