use vize_l0::pass::{Fusability, PassDesc, PassKind, Preserved};
pub const NAME: &str = "hoist-static";
pub const DESC: PassDesc = PassDesc::new(
NAME,
PassKind::Optional,
Fusability::Fusable,
Preserved::ALL,
);
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum StaticLevel {
NotStatic,
HasDynamicText,
FullyStatic,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct StaticFacts {
pub level: StaticLevel,
pub props_hoistable: bool,
pub nested_static: bool,
pub native_descendants: bool,
pub foreign: bool,
}
const _: () = {
const fn assert_owned<T: 'static>() {}
assert_owned::<StaticFacts>();
};
const _: () = assert!(core::mem::size_of::<StaticFacts>() == 5);