diff options
| author | Michael Krasnitski <michael.krasnitski@gmail.com> | 2024-02-27 14:26:56 -0500 |
|---|---|---|
| committer | Kyle Martin <krm504@nyu.edu> | 2024-03-18 17:46:37 -0400 |
| commit | 462276a4aa998e0b0ef804dd8d3b2eaa84a82f98 (patch) | |
| tree | 913c2d20bfe987505475f3b40f32201ff7060133 /rust/src/mlil/function.rs | |
| parent | 14abee20c4122608b21f3c2b55cba4a75d1b4308 (diff) | |
Move `ILFunction` trait into `operand_iter.rs` to make it private
Diffstat (limited to 'rust/src/mlil/function.rs')
| -rw-r--r-- | rust/src/mlil/function.rs | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/rust/src/mlil/function.rs b/rust/src/mlil/function.rs index b1e15f8b..16cc5102 100644 --- a/rust/src/mlil/function.rs +++ b/rust/src/mlil/function.rs @@ -2,18 +2,16 @@ use core::hash::{Hash, Hasher}; use binaryninjacore_sys::BNFreeMediumLevelILFunction; use binaryninjacore_sys::BNGetMediumLevelILBasicBlockList; -use binaryninjacore_sys::BNGetMediumLevelILByIndex; use binaryninjacore_sys::BNGetMediumLevelILInstructionCount; use binaryninjacore_sys::BNGetMediumLevelILOwnerFunction; use binaryninjacore_sys::BNGetMediumLevelILSSAForm; use binaryninjacore_sys::BNMediumLevelILFunction; use binaryninjacore_sys::BNMediumLevelILGetInstructionStart; -use binaryninjacore_sys::BNMediumLevelILOperation; use binaryninjacore_sys::BNNewMediumLevelILFunctionReference; use crate::basicblock::BasicBlock; +use crate::function::Function; use crate::function::Location; -use crate::function::{Function, ILFunction}; use crate::rc::{Array, Ref, RefCountable}; use super::{MediumLevelILBlock, MediumLevelILInstruction, MediumLevelILLiftedInstruction}; @@ -95,20 +93,6 @@ impl MediumLevelILFunction { } } -impl ILFunction for MediumLevelILFunction { - type Instruction = MediumLevelILInstruction; - - fn il_instruction_from_idx(&self, expr_idx: usize) -> Self::Instruction { - self.instruction_from_idx(expr_idx) - } - - fn operands_from_idx(&self, expr_idx: usize) -> [u64; 5] { - let node = unsafe { BNGetMediumLevelILByIndex(self.handle, expr_idx) }; - assert_eq!(node.operation, BNMediumLevelILOperation::MLIL_UNDEF); - node.operands - } -} - impl ToOwned for MediumLevelILFunction { type Owned = Ref<Self>; |
