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

Switch most of ImportRefResolver to non-member functions #4584

Merged
merged 11 commits into from
Nov 26, 2024

Conversation

zygoloid
Copy link
Contributor

In preparation for further refactoring, switch away from member functions for most of ImportRefResolver.

Split ImportRefResolver into a context class that exposes the value stores for the source and destination files, and a derived class that maintains a worklist. The idea is to statically enforce that functions that take ImportContext cannot accidentally add new work, because they don't have access to the work queue.

@zygoloid zygoloid removed the request for review from jonmeow November 25, 2024 20:15
@zygoloid zygoloid added this pull request to the merge queue Nov 26, 2024
Merged via the queue into carbon-language:trunk with commit c0faa81 Nov 26, 2024
8 checks passed
@zygoloid zygoloid deleted the toolchain-refactor-importref branch November 26, 2024 01:52
bricknerb pushed a commit to bricknerb/carbon-lang that referenced this pull request Nov 28, 2024
…nguage#4584)

In preparation for further refactoring, switch away from member
functions for most of `ImportRefResolver`.

Split `ImportRefResolver` into a context class that exposes the value
stores for the source and destination files, and a derived class that
maintains a worklist. The idea is to statically enforce that functions
that take `ImportContext` cannot accidentally add new work, because they
don't have access to the work queue.
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.

2 participants