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

Cranelift: Remove the LowerCtx trait #4697

Merged
merged 1 commit into from
Aug 11, 2022

Conversation

fitzgen
Copy link
Member

@fitzgen fitzgen commented Aug 11, 2022

The trait had only one implementation: the Lower struct. It is easier to just
use that directly, and not introduce unnecessary layers of generics and
abstractions.

Once upon a time, there was hope that we would have other implementations of the
LowerCtx trait, that did things like lower CLIF to SMTLIB for
verification. However, this is not practical these days given the way that the
trait has evolved over time, and our verification efforts are focused on ISLE
now anyways, and we're actually making some progress on that front (much more
than anyone ever did on a second LowerCtx trait implementation!)

@fitzgen fitzgen requested a review from cfallin August 11, 2022 22:33
Copy link
Member

@cfallin cfallin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was actually pleasantly straightforward -- thanks, it's a good simplification!

cranelift/codegen/src/machinst/lower.rs Show resolved Hide resolved
The trait had only one implementation: the `Lower` struct. It is easier to just
use that directly, and not introduce unnecessary layers of generics and
abstractions.

Once upon a time, there was hope that we would have other implementations of the
`LowerCtx` trait, that did things like lower CLIF to SMTLIB for
verification. However, this is not practical these days given the way that the
trait has evolved over time, and our verification efforts are focused on ISLE
now anyways, and we're actually making some progress on that front (much more
than anyone ever did on a second `LowerCtx` trait implementation!)
@fitzgen fitzgen force-pushed the no-more-local-ctx-trait branch from 47b2285 to a9e2777 Compare August 11, 2022 23:00
@fitzgen fitzgen merged commit 532fb22 into bytecodealliance:main Aug 11, 2022
@fitzgen fitzgen deleted the no-more-local-ctx-trait branch August 11, 2022 23:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants