Skip to main content

luaur_compiler/records/
local.rs

1#[derive(Debug, Clone, Copy, PartialEq, Eq)]
2pub struct Local {
3    pub(crate) reg: u8,
4    pub(crate) allocated: bool,
5    pub(crate) captured: bool,
6    pub(crate) debugpc: u32,
7    pub(crate) allocpc: u32,
8}
9
10impl Default for Local {
11    fn default() -> Self {
12        Self {
13            reg: 0,
14            allocated: false,
15            captured: false,
16            debugpc: 0,
17            allocpc: 0,
18        }
19    }
20}
21
22impl luaur_common::records::dense_hash_table::DenseDefault for Local {
23    fn dense_default() -> Self {
24        Self::default()
25    }
26}