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

Unify parsed and typed symbols namespace maps. #6070

Merged
merged 8 commits into from
May 31, 2024

Conversation

tritao
Copy link
Contributor

@tritao tritao commented May 28, 2024

Description

As title PR, this unifies the different maps we had to represent both parsed and typed declaration for namespace module symbols.

This simplifies all the code that handles symbols since there is a single map to represent symbols at all stages in the compiler.

I tried moving all shadowing-related diagnostics to be run on the parsed declarations but it will only possible to do until the other PR for full collection/resolving is done. At the moment it leads to out of order diagnostics which breaks the test. So just left a TODO and will move those over in a separate PR once its possible to do so.

Depends on #6062.

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: 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 May 28, 2024
@tritao tritao self-assigned this May 28, 2024
@tritao tritao force-pushed the refactor-parsed-symbols-map branch 3 times, most recently from 344f5df to ce88bba Compare May 29, 2024 10:37
@tritao tritao force-pushed the refactor-parsed-symbols-map branch from ce88bba to b0f24cd Compare May 29, 2024 11:56
@tritao tritao marked this pull request as ready for review May 29, 2024 12:30
@tritao tritao requested review from a team May 29, 2024 12:33
Copy link
Contributor

@jjcnn jjcnn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a very good change. I've left a single comment and a nit.

sway-core/src/semantic_analysis/node_dependencies.rs Outdated Show resolved Hide resolved
sway-core/src/semantic_analysis/namespace/lexical_scope.rs Outdated Show resolved Hide resolved
@IGI-111 IGI-111 requested a review from a team May 31, 2024 04:50
@IGI-111 IGI-111 enabled auto-merge (squash) May 31, 2024 05:40
@IGI-111 IGI-111 merged commit a34950b into FuelLabs:master May 31, 2024
38 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants