diff options
| author | Peter LaFosse <peter@vector35.com> | 2022-04-11 11:53:01 -0400 |
|---|---|---|
| committer | Peter LaFosse <peter@vector35.com> | 2022-04-14 09:22:49 -0400 |
| commit | 4425004475844466f2faa28bc1b136bf6da74977 (patch) | |
| tree | 0131826d2f1857f2de65b4f47a2486a4c69005d3 /python/highlevelil.py | |
| parent | dc0626a11c30387993380a31db3b4bce23d81983 (diff) | |
Add some python api side caching to improve performance for some frequently accessed fields
Diffstat (limited to 'python/highlevelil.py')
| -rw-r--r-- | python/highlevelil.py | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/python/highlevelil.py b/python/highlevelil.py index c77a4e39..e2a53bb5 100644 --- a/python/highlevelil.py +++ b/python/highlevelil.py @@ -2302,21 +2302,13 @@ class HighLevelILFunction: """ ``is_var_live_at`` determines if ``var`` is live at a given point in the function """ - var_data = core.BNVariable() - var_data.type = var.source_type - var_data.index = var.index - var_data.storage = var.storage - return core.BNIsHighLevelILVarLiveAt(self.handle, var_data, instr) + return core.BNIsHighLevelILVarLiveAt(self.handle, var.to_BNVariable(), instr) def is_ssa_var_live_at(self, ssa_var: 'mediumlevelil.SSAVariable', instr: InstructionIndex) -> bool: """ ``is_ssa_var_live_at`` determines if ``ssa_var`` is live at a given point in the function; counts phi's as uses """ - var_data = core.BNVariable() - var_data.type = ssa_var.var.source_type - var_data.index = ssa_var.var.index - var_data.storage = ssa_var.var.storage - return core.BNIsHighLevelILSSAVarLiveAt(self.handle, var_data, ssa_var.version, instr) + return core.BNIsHighLevelILSSAVarLiveAt(self.handle, ssa_var.var.to_BNVariable(), ssa_var.version, instr) def get_var_definitions(self, var: 'variable.Variable') -> List[HighLevelILInstruction]: count = ctypes.c_ulonglong() |
