Skip to content

Cranelift: Remove the LowerCtx trait#4697

Merged
fitzgen merged 1 commit into
bytecodealliance:mainfrom
fitzgen:no-more-local-ctx-trait
Aug 11, 2022
Merged

Cranelift: Remove the LowerCtx trait#4697
fitzgen merged 1 commit into
bytecodealliance:mainfrom
fitzgen:no-more-local-ctx-trait

Conversation

@fitzgen
Copy link
Copy Markdown
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
Copy Markdown
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!

Comment thread cranelift/codegen/src/machinst/lower.rs
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