From 7e32ee8b629e3e4f8d061cbe0729ff961b3502d7 Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Sat, 10 May 2025 19:24:35 -0400 Subject: [Rust] Remove `NonSSAVariant` bound from `LowLevelILFunction` We don't do enough with the lifted il != non lifted il to justify the bound. This makes modifying IL much less work as the historical lifted il bound is gone. --- rust/src/low_level_il.rs | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'rust/src/low_level_il.rs') diff --git a/rust/src/low_level_il.rs b/rust/src/low_level_il.rs index 4c52e313..010fa0bc 100644 --- a/rust/src/low_level_il.rs +++ b/rust/src/low_level_il.rs @@ -36,19 +36,20 @@ use self::expression::*; use self::function::*; use self::instruction::*; -pub type MutableLiftedILFunction = LowLevelILFunction>; -pub type LiftedILFunction = LowLevelILFunction>; -pub type MutableLiftedILExpr<'a, ReturnType> = - LowLevelILExpression<'a, Mutable, NonSSA, ReturnType>; -pub type RegularLowLevelILFunction = LowLevelILFunction>; -pub type RegularLowLevelILInstruction<'a> = - LowLevelILInstruction<'a, Finalized, NonSSA>; -pub type RegularLowLevelILInstructionKind<'a> = - LowLevelILInstructionKind<'a, Finalized, NonSSA>; -pub type RegularLowLevelILExpression<'a, ReturnType> = - LowLevelILExpression<'a, Finalized, NonSSA, ReturnType>; -pub type RegularLowLevelILExpressionKind<'a> = - LowLevelILExpressionKind<'a, Finalized, NonSSA>; +/// Regular low-level IL, if you are not modifying the functions IL or needing SSA, use this. +pub type LowLevelILRegularFunction = LowLevelILFunction; +pub type LowLevelILRegularInstruction<'a> = LowLevelILInstruction<'a, Finalized, NonSSA>; +pub type LowLevelILRegularInstructionKind<'a> = LowLevelILInstructionKind<'a, Finalized, NonSSA>; +pub type LowLevelILRegularExpression<'a, ReturnType> = + LowLevelILExpression<'a, Finalized, NonSSA, ReturnType>; +pub type LowLevelILRegularExpressionKind<'a> = LowLevelILExpressionKind<'a, Finalized, NonSSA>; + +/// Mutable low-level IL, used when lifting in architectures and modifying IL in workflow activities. +pub type LowLevelILMutableFunction = LowLevelILFunction; +pub type LowLevelILMutableExpression<'a, ReturnType> = + LowLevelILExpression<'a, Mutable, NonSSA, ReturnType>; + +/// SSA Variant of low-level IL, this can never be mutated directly. pub type LowLevelILSSAFunction = LowLevelILFunction; #[derive(Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -- cgit v1.3.1