Struct ProcessingState
pub struct ProcessingState {
pub needs_ssa_build: DashSet<Token>,
pub method_dirty: DashSet<Token>,
pub method_stable: DashSet<Token>,
pub newly_detected: DashSet<Token>,
pub type_dirty: DashSet<Token>,
pub type_stable: DashSet<Token>,
/* private fields */
}Expand description
Tracks processing state for methods, types, and the assembly during the deobfuscation fixpoint loop.
State transitions:
- Methods:
dirty→ (pass runs) →stableorneeds_ssa_build - SSA build:
needs_ssa_build→ (build) →dirty - Types:
type_dirty→ (pass runs) →type_stable
Fields§
§needs_ssa_build: DashSet<Token>Methods needing SSA (re)construction before passes can process them.
method_dirty: DashSet<Token>Methods that have been modified and need reprocessing.
method_stable: DashSet<Token>Methods that have reached fixpoint (no changes in last pass iteration).
newly_detected: DashSet<Token>Tokens discovered during re-detection that need processing.
type_dirty: DashSet<Token>Types with modified members that need reprocessing.
type_stable: DashSet<Token>Types that have reached fixpoint.
Implementations§
§impl ProcessingState
impl ProcessingState
pub fn new() -> Self
pub fn new() -> Self
Creates a new empty processing state.
pub fn from_methods(methods: impl IntoIterator<Item = Token>) -> Self
pub fn from_methods(methods: impl IntoIterator<Item = Token>) -> Self
Creates a processing state where all given methods start as dirty.
pub fn mark_method_dirty(&self, token: Token)
pub fn mark_method_dirty(&self, token: Token)
Marks a method as dirty (needing reprocessing).
Removes the method from the stable set if present.
pub fn mark_method_stable(&self, token: Token)
pub fn mark_method_stable(&self, token: Token)
Marks a method as stable (reached fixpoint).
Removes the method from the dirty set if present.
pub fn mark_needs_ssa_build(&self, token: Token)
pub fn mark_needs_ssa_build(&self, token: Token)
Marks a method as needing SSA (re)construction.
Removes the method from both dirty and stable sets.
pub fn mark_ssa_built(&self, token: Token)
pub fn mark_ssa_built(&self, token: Token)
Marks a method’s SSA as built, transitioning it to dirty for pass processing.
Removes the method from the needs_ssa_build set.
pub fn mark_type_dirty(&self, token: Token)
pub fn mark_type_dirty(&self, token: Token)
Marks a type as dirty (has modified members).
Removes the type from the stable set if present.
pub fn mark_type_stable(&self, token: Token)
pub fn mark_type_stable(&self, token: Token)
Marks a type as stable (reached fixpoint).
Removes the type from the dirty set if present.
pub fn mark_assembly_dirty(&self)
pub fn mark_assembly_dirty(&self)
Sets the assembly-wide dirty flag.
pub fn clear_assembly_dirty(&self)
pub fn clear_assembly_dirty(&self)
Clears the assembly-wide dirty flag.
pub fn is_assembly_dirty(&self) -> bool
pub fn is_assembly_dirty(&self) -> bool
Returns true if the assembly-wide dirty flag is set.
pub fn has_pending_work(&self) -> bool
pub fn has_pending_work(&self) -> bool
Returns true if there is any pending work (dirty methods/types,
SSA builds needed, newly detected tokens, or assembly dirty).
pub fn dirty_method_count(&self) -> usize
pub fn dirty_method_count(&self) -> usize
Returns the number of dirty methods.
pub fn stable_method_count(&self) -> usize
pub fn stable_method_count(&self) -> usize
Returns the number of stable methods.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for ProcessingState
impl !RefUnwindSafe for ProcessingState
impl Send for ProcessingState
impl Sync for ProcessingState
impl Unpin for ProcessingState
impl UnsafeUnpin for ProcessingState
impl UnwindSafe for ProcessingState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for T
impl<T> Downcast for T
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.