Skip to content

Conversation

@sim642
Copy link
Member

@sim642 sim642 commented Jan 11, 2022

While debugging other incremental issues, I realized that some dead branch warnings go missing. This was because dead branch detection used global hashtables in the Deadcode module to accomplish its job.

This PR replaces that with the general global invariant mechanism. While doing so, it switches from using locations to nodes, making it even more robust for the incremental case.
A useful side effect of the latter is that now dead branch warnings are also given for subexpressions of short-circuting conditions (e.g. a && b). Previously this was broken since both branching nodes had the same location, which quietly broke the location-based hashtable.

This PR is on top of #391. On master the incremental problem doesn't appear because postsolving isn't done incrementally, so all the dead branch warnings get recreated anyway.

TODO

  • Fix global view in HTML.

@sim642 sim642 merged commit 4a03b3f into interactive Jan 19, 2022
@sim642 sim642 deleted the dead-branch-incremental branch January 19, 2022 12:31
sim642 added a commit that referenced this pull request Jan 20, 2022
@sim642 sim642 mentioned this pull request Feb 11, 2022
5 tasks
@sim642 sim642 added this to the v2.0.0 milestone Aug 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants