| 3803 | core.BNLowLevelILSetIndirectBranches(self.handle, branch_list, len(branches)) |
| 3804 | |
| 3805 | def expr( |
| 3806 | self, operation, a: ExpressionIndex = 0, b: ExpressionIndex = 0, c: ExpressionIndex = 0, d: ExpressionIndex = 0, size: int = 0, |
| 3807 | flags: Optional[Union['architecture.FlagWriteTypeName', 'architecture.FlagType', 'architecture.FlagIndex', int]] = None, |
| 3808 | source_location: Optional['ILSourceLocation'] = None |
| 3809 | ) -> ExpressionIndex: |
| 3810 | _flags = architecture.FlagIndex(0) |
| 3811 | if isinstance(operation, str): |
| 3812 | operation = LowLevelILOperation[operation] |
| 3813 | elif isinstance(operation, LowLevelILOperation): |
| 3814 | operation = operation.value |
| 3815 | if isinstance(flags, str): |
| 3816 | _flags = self.arch.get_flag_write_type_by_name(architecture.FlagWriteTypeName(flags)) |
| 3817 | elif isinstance(flags, ILFlag): |
| 3818 | _flags = flags.index |
| 3819 | elif isinstance(flags, int): |
| 3820 | _flags = architecture.FlagIndex(flags) |
| 3821 | elif flags is None: |
| 3822 | _flags = architecture.FlagIndex(0) |
| 3823 | else: |
| 3824 | assert False, "flags type unsupported" |
| 3825 | if source_location is not None: |
| 3826 | return ExpressionIndex(core.BNLowLevelILAddExprWithLocation( |
| 3827 | self.handle, |
| 3828 | source_location.address, |
| 3829 | source_location.source_operand, |
| 3830 | operation, |
| 3831 | size, |
| 3832 | _flags, |
| 3833 | a, |
| 3834 | b, |
| 3835 | c, |
| 3836 | d |
| 3837 | )) |
| 3838 | else: |
| 3839 | return ExpressionIndex(core.BNLowLevelILAddExpr(self.handle, operation, size, _flags, a, b, c, d)) |
| 3840 | |
| 3841 | def get_expr_count(self) -> int: |
| 3842 | """ |