-
Notifications
You must be signed in to change notification settings - Fork 3
Refactor expr_pass #19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This takes care of the beautification stuff, now I can work on missing grammar |
This is mostly fixed, the next things I will do are outside the scope of this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Refactors expression and binary operation handling by modularizing logic, simplifying function signatures, and expanding operand support; adjusts tests accordingly and changes default compile logging verbosity.
- Extracted expression evaluation into helper functions and simplified binary op handling to return computed values.
- Updated tests to use tracepoint section names and expanded a binary operation chain.
- Changed default logging level for compile() from WARNING to INFO.
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
tests/passing_tests/binops1.py | Modified test: changed section decorator, added print, and altered return value. |
tests/passing_tests/binops.py | Modified test to use longer chained binary expression. |
pythonbpf/functions_pass.py | Updated call to handle_binary_op to match new, reduced parameter list. |
pythonbpf/expr_pass.py | Refactored eval_expr into smaller helpers for names, constants, attributes, and deref calls. |
pythonbpf/codegen.py | Changed default log level of compile() to INFO (behavioral/API change). |
pythonbpf/binary_ops.py | Refactored binary op handling: added operand resolver, recursive support, and operation mapping. |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
No description provided.