luaur-code-gen 0.1.0

Native (A64/X64) code generation for Luau (Rust).
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::records::standalone_code_gen_context::StandaloneCodeGenContext;

impl StandaloneCodeGenContext {
    pub fn on_close_state(&mut self) {
        // The StandaloneCodeGenContext is owned by the one VM that owns it, so when
        // that VM is destroyed, we destroy *this as well:
        unsafe {
            let _ = Box::from_raw(self);
        }
    }
}

#[allow(non_snake_case)]
pub fn standalone_code_gen_context_on_close_state(this: &mut StandaloneCodeGenContext) {
    this.on_close_state();
}