luaur_analysis/methods/
anyification_is_dirty_anyification.rs1use crate::enums::table_state::TableState;
2use crate::records::anyification::Anyification;
3use crate::records::free_type::FreeType;
4use crate::records::table_type::TableType;
5use crate::type_aliases::type_id::TypeId;
6
7impl Anyification {
8 pub fn is_dirty_type_id(&mut self, ty: TypeId) -> bool {
9 unsafe {
10 if (*ty).persistent {
11 return false;
12 }
13
14 let log = self.base.base.log;
15
16 let ttv = (*log).txn_log_get_mutable::<TableType, TypeId>(ty);
17 if !ttv.is_null() {
18 return (*ttv).state == TableState::Free || (*ttv).state == TableState::Unsealed;
19 }
20
21 let ftv = (*log).txn_log_get_mutable::<FreeType, TypeId>(ty);
22 if !ftv.is_null() {
23 return true;
24 }
25
26 false
27 }
28 }
29}