-
-
Notifications
You must be signed in to change notification settings - Fork 849
refactor[venom]: refactor ir_node_to_venom #4684
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
base: master
Are you sure you want to change the base?
refactor[venom]: refactor ir_node_to_venom #4684
Conversation
explicit Label/PUSHLABEL instructions.
runtime source map now only appears in source_map_runtime, not source_map.
def __init__(self, item: bytes | Label): | ||
self.data = item | ||
|
||
def __repr__(self): |
Check notice
Code scanning / CodeQL
Explicit returns mixed with implicit (fall through) returns Note
# at _sym_revert0 to: INVALID | ||
return [_revert_label, "JUMPI"] | ||
# a string (assembly instruction) but with additional metadata from the source code | ||
class TaggedInstruction(str): |
Check warning
Code scanning / CodeQL
`__eq__` not overridden when adding attributes Warning
'__eq__'
error_msg
The class 'TaggedInstruction' does not override
'__eq__'
pc_debugger
The class 'TaggedInstruction' does not override
'__eq__'
ast_source
def _convert_ir_list(self, ir_list: Iterable[IRnode]): | ||
return [self.convert_ir(ir_node) for ir_node in ir_list] | ||
|
||
def _convert_ir(self, ir: IRnode): |
Check notice
Code scanning / CodeQL
Explicit returns mixed with implicit (fall through) returns Note
new_fn = self._handle_internal_func(ir, does_return_data) | ||
with self.anchor_fn(new_fn): | ||
for ir_node in ir.args[1:]: | ||
ret = self.convert_ir(ir_node) |
Check notice
Code scanning / CodeQL
Unused local variable Note
What I did
remove globals, make a builder/lowerer object so that we can build venom incrementally too
continues off of #4663 since there would be merge conflicts otherwise.
How I did it
How to verify it
Commit message
Commit message for the final, squashed PR. (Optional, but reviewers will appreciate it! Please see our commit message style guide for what we would ideally like to see in a commit message.)
Description for the changelog
Cute Animal Picture