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

Change the criterion for KRML_IGNORE vs KRML_MAYBE_UNUSED_VAR #494

Merged
merged 2 commits into from
Oct 22, 2024

Conversation

msprotz
Copy link
Contributor

@msprotz msprotz commented Oct 22, 2024

before, when discovering that x is unused in let x = e1 in e2 , we would unconditionally push KRML_IGNORE down e1 (possibly beneath multiple layers of let-bindings)

now, instead, we either do let x = KRML_IGNORE(e1) in e2 is e1 is a value, otherwise, we do let x = e1 in KRML_MAYBE_UNUSED_VAR(x); e2

@msprotz msprotz marked this pull request as ready for review October 22, 2024 00:10
@msprotz
Copy link
Contributor Author

msprotz commented Oct 22, 2024

(waiting to see the result for code quality in HACL*)

@msprotz msprotz merged commit 87384b2 into master Oct 22, 2024
2 checks passed
@msprotz msprotz deleted the protz_ignore branch October 22, 2024 00:30
@msprotz
Copy link
Contributor Author

msprotz commented Oct 22, 2024

(Actually generates slightly better code for HACL*)

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.

1 participant