mirror of
https://github.com/varun-r-mallya/Python-BPF.git
synced 2025-12-31 21:06:25 +00:00
Fix handle_binary_ops calls in functions_pass
This commit is contained in:
@ -233,7 +233,7 @@ def handle_assign(
|
|||||||
else:
|
else:
|
||||||
logger.info("Unsupported assignment call function type")
|
logger.info("Unsupported assignment call function type")
|
||||||
elif isinstance(rval, ast.BinOp):
|
elif isinstance(rval, ast.BinOp):
|
||||||
handle_binary_op(rval, module, builder, var_name, local_sym_tab)
|
handle_binary_op(rval, builder, var_name, local_sym_tab)
|
||||||
else:
|
else:
|
||||||
logger.info("Unsupported assignment value type")
|
logger.info("Unsupported assignment value type")
|
||||||
|
|
||||||
@ -406,9 +406,7 @@ def process_stmt(
|
|||||||
did_return = True
|
did_return = True
|
||||||
elif isinstance(stmt.value.args[0], ast.BinOp):
|
elif isinstance(stmt.value.args[0], ast.BinOp):
|
||||||
# TODO: Should be routed through eval_expr
|
# TODO: Should be routed through eval_expr
|
||||||
val = handle_binary_op(
|
val = handle_binary_op(stmt.value.args[0], builder, None, local_sym_tab)
|
||||||
stmt.value.args[0], module, builder, None, local_sym_tab
|
|
||||||
)
|
|
||||||
if val is None:
|
if val is None:
|
||||||
raise ValueError("Failed to evaluate return expression")
|
raise ValueError("Failed to evaluate return expression")
|
||||||
if val[1] != ret_type:
|
if val[1] != ret_type:
|
||||||
|
|||||||
Reference in New Issue
Block a user