mirror of
https://github.com/varun-r-mallya/Python-BPF.git
synced 2025-12-31 21:06:25 +00:00
Add _handle_cond to expr_pass
This commit is contained in:
@ -132,6 +132,12 @@ def _handle_ctypes_call(
|
|||||||
return val
|
return val
|
||||||
|
|
||||||
|
|
||||||
|
def _handle_compare(
|
||||||
|
func, module, builder, expr, local_sym_tab, map_sym_tab, structs_sym_tab=None
|
||||||
|
):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
def eval_expr(
|
def eval_expr(
|
||||||
func,
|
func,
|
||||||
module,
|
module,
|
||||||
@ -212,6 +218,10 @@ def eval_expr(
|
|||||||
from pythonbpf.binary_ops import handle_binary_op
|
from pythonbpf.binary_ops import handle_binary_op
|
||||||
|
|
||||||
return handle_binary_op(expr, builder, None, local_sym_tab)
|
return handle_binary_op(expr, builder, None, local_sym_tab)
|
||||||
|
elif isinstance(expr, ast.Compare):
|
||||||
|
return _handle_compare(
|
||||||
|
func, module, builder, expr, local_sym_tab, map_sym_tab, structs_sym_tab
|
||||||
|
)
|
||||||
logger.info("Unsupported expression evaluation")
|
logger.info("Unsupported expression evaluation")
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user