Skip to content

Moving DCE into its own package #1339

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

Merged
merged 2 commits into from
Oct 2, 2024
Merged

Conversation

grantnelson-wf
Copy link
Collaborator

@grantnelson-wf grantnelson-wf commented Aug 22, 2024

The dead-code elimination (DCE) code has two filter strings and dependencies as a set of strings. The strings have special meanings such as both empty strings indicate always alive. To help facilitate future changes to DCE, I'm moving the DCE code to it's own package. Also I'm making some methods to set a decl's DCE filters and deps to ensure that the names are continued to be set the same as new changes are made.

These changes should have only minor functional changes, everything should continue to function as before. These changes are mostly a minor refactor to encapsulate DCE design decisions. The CI should continue to pass.

This is related to #1013 and #1270 work since the future changes to DCE is to include removal of dead generic code instantiations, e.g. allow List[int] to be alive and List[string] be dead separately.

@grantnelson-wf grantnelson-wf marked this pull request as ready for review August 22, 2024 15:57
@grantnelson-wf grantnelson-wf changed the title [go1.20] Moving DCE into its own package Moving DCE into its own package Aug 22, 2024
@nevkontakte nevkontakte merged commit 56cec36 into gopherjs:master Oct 2, 2024
10 checks passed
@grantnelson-wf grantnelson-wf deleted the encapDCE2 branch October 2, 2024 19:32
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