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

compact: Don't assume Emitted expressions are live. #2543

Merged
merged 2 commits into from
Oct 9, 2023

Conversation

jimblandy
Copy link
Member

If an Emit statement covers an Expression that is not otherwise
used by any Statement, remove it from the Arena anyway. An Emit
statement controls when Expressions are evaluated, but it doesn't
have any side effects, so unless an expression is used by some other
statement, it's not necessary to the program.

compact: Minor cleanups.

  • Simplify visibility markings.

  • Remove some testing comments. (Tests carried out.)

  • Remove some commented-out code.

- Simplify visibility markings.

- Remove some testing comments. (Tests carried out.)

- Remove some commented-out code.
If an `Emit` statement covers an `Expression` that is not otherwise
used by any `Statement`, remove it from the `Arena` anyway. An `Emit`
statement controls when `Expression`s are evaluated, but it doesn't
have any side effects, so unless an expression is used by some other
statement, it's not necessary to the program.
@jimblandy jimblandy requested a review from teoxoy October 7, 2023 22:26
@teoxoy teoxoy merged commit fa0fed1 into gfx-rs:master Oct 9, 2023
5 checks passed
@jimblandy jimblandy deleted the compact-no-trace-emit branch October 22, 2023 00:39
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