From fa586cb46674fec5f0233bd05e93e414190c975d Mon Sep 17 00:00:00 2001 From: Fish Date: Tue, 17 Sep 2024 14:42:11 -0700 Subject: [PATCH] AILBlockWalkerBase: Calls handle targets. --- ailment/block_walker.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ailment/block_walker.py b/ailment/block_walker.py index 9d21ae9..52490ba 100644 --- a/ailment/block_walker.py +++ b/ailment/block_walker.py @@ -106,6 +106,7 @@ def _handle_Assignment(self, stmt_idx: int, stmt: Assignment, block: Block | Non self._handle_expr(1, stmt.src, stmt_idx, stmt, block) def _handle_Call(self, stmt_idx: int, stmt: Call, block: Block | None): + self._handle_expr(-1, stmt.target, stmt_idx, stmt, block) if stmt.args: for i, arg in enumerate(stmt.args): self._handle_expr(i, arg, stmt_idx, stmt, block) @@ -128,6 +129,7 @@ def _handle_Load(self, expr_idx: int, expr: Load, stmt_idx: int, stmt: Statement self._handle_expr(0, expr.addr, stmt_idx, stmt, block) def _handle_CallExpr(self, expr_idx: int, expr: Call, stmt_idx: int, stmt: Statement, block: Block | None): + self._handle_expr(-1, expr.target, stmt_idx, stmt, block) if expr.args: for i, arg in enumerate(expr.args): self._handle_expr(i, arg, stmt_idx, stmt, block)