Skip to content

Commit

Permalink
AILBlockWalkerBase: Calls handle targets. (#238)
Browse files Browse the repository at this point in the history
  • Loading branch information
ltfish authored Sep 17, 2024
1 parent ebb0e4f commit e05534b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ailment/block_walker.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit e05534b

Please sign in to comment.