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

Refactor trait map and module symbol resolution code to allow usage for parsed declarations #5810

Merged
merged 4 commits into from
Apr 3, 2024

Conversation

tritao
Copy link
Contributor

@tritao tritao commented Apr 1, 2024

Description

This PR unifies the codepaths in trait map and name resolution code so they can work for both parsed and typed declarations.
It does this by introducing wrapper types for the output of resolving of names.

This is an intermediate step to being able to use this code on the new symbol resolving pass.

While this adds a little bit of minor bloat to the code, I think it's an acceptable further step to be able to do re-use the code in steps before type-checking.

Checklist

  • I have linked to any relevant issues.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation where relevant (API docs, the reference, and the Sway book).
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added (or requested a maintainer to add) the necessary Breaking* or New Feature labels where relevant.
  • I have done my best to ensure that my PR adheres to the Fuel Labs Code Review Standards.
  • I have requested a review from the relevant team or maintainers.

@tritao tritao added compiler General compiler. Should eventually become more specific as the issue is triaged compiler: frontend Everything to do with type checking, control flow analysis, and everything between parsing and IRgen compiler: collection Everything to do with graph collection, type collection, and the collection context. labels Apr 1, 2024
@tritao tritao self-assigned this Apr 1, 2024
@tritao tritao force-pushed the module-resolved-declaration branch from c121c66 to d2e03cf Compare April 1, 2024 16:21
@tritao tritao marked this pull request as ready for review April 1, 2024 17:08
@tritao tritao changed the title Module resolved declaration Refactor trait map and module symbol resolution code to allow usage for parsed declarations Apr 1, 2024
@tritao tritao requested review from esdrubal and a team April 1, 2024 17:09
@IGI-111 IGI-111 requested a review from a team April 3, 2024 10:37
@JoshuaBatty JoshuaBatty merged commit 2eb6f2a into FuelLabs:master Apr 3, 2024
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler: collection Everything to do with graph collection, type collection, and the collection context. compiler: frontend Everything to do with type checking, control flow analysis, and everything between parsing and IRgen compiler General compiler. Should eventually become more specific as the issue is triaged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants