Skip to content
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

Implement Clone for Expression #5634

Closed
wants to merge 1 commit into from
Closed

Conversation

emesare
Copy link
Member

@emesare emesare commented Jun 19, 2024

This is the rust equivalent to python's LowLevelILFunction.copy_expr. This is very useful when replacing expressions with the original expression being a child expression, as replacing the expression without recreating the original expression will lead to the child expression sharing the same expression index, causing any visitor to infinitely loop.

This allows you to clone the expression which effectively creates a new expression index for which you can slot into the replaced expression.

@emesare emesare added the Component: Rust API Issue needs changes to the Rust API label Jun 19, 2024
@emesare
Copy link
Member Author

emesare commented Jun 20, 2024

Closing this in favor of #5641

@emesare emesare closed this Jun 20, 2024
@emesare emesare deleted the rust_cloneable_expression branch July 10, 2024 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Rust API Issue needs changes to the Rust API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant