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 handling when doing namespace item imports. #6080

Merged
merged 2 commits into from
Jun 1, 2024

Conversation

tritao
Copy link
Contributor

@tritao tritao commented May 31, 2024

Description

This splits off trait handling when doing namespace item imports to be done as a separate step.
Instead of doing it as we build the import tree, we now do it at a later stage.

This process requires a fully typed tree, which is not available when doing imports for a parsed declaration tree.

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 31, 2024
@tritao tritao self-assigned this May 31, 2024
@tritao tritao force-pushed the refactor-trait-handling-item-import branch from b1f2604 to ed8ee9c Compare May 31, 2024 13:28
@tritao tritao requested review from jjcnn and a team May 31, 2024 13:57
@tritao tritao marked this pull request as ready for review May 31, 2024 13:57
@IGI-111 IGI-111 requested a review from a team May 31, 2024 18:47
@tritao tritao enabled auto-merge (squash) June 1, 2024 08:15
@tritao tritao merged commit 0e56728 into FuelLabs:master Jun 1, 2024
38 checks passed
tritao added a commit to tritao/sway that referenced this pull request Jun 25, 2024
This reverts PR FuelLabs#6080 due to a pretty severe performance regression.

The reason this was split to a separate step was because it needs a
typed declaration due to the depedency on the type system and thus
cannot be used during collection.

However, the type system will be changed to work with parsed
declarations pretty soon, so revert this back to the old behavior and
temporarily check for a typed declaration instead.

Fixes FuelLabs#6182.
tritao added a commit to tritao/sway that referenced this pull request Jun 25, 2024
This reverts PR FuelLabs#6080 due to a pretty severe performance regression.

The reason this was split to a separate step was because it needs a
typed declaration due to the depedency on the type system and thus
cannot be used during collection.

However, the type system will be changed to work with parsed
declarations pretty soon, so revert this back to the old behavior and
temporarily check for a typed declaration instead.

Fixes FuelLabs#6182.
JoshuaBatty added a commit that referenced this pull request Jun 26, 2024
This reverts PR #6080 due to a pretty severe performance regression.

The reason this was split to a separate step was because it needs a
typed declaration due to the depedency on the type system and thus
cannot be used during collection.

However, the type system will be changed to work with parsed
declarations pretty soon, so revert this back to the old behavior and
temporarily check for a typed declaration instead.

Fixes #6182.

## Description


## 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).
- [ ] If my change requires substantial documentation changes, I have
[requested support from the DevRel
team](https://github.com/FuelLabs/devrel-requests/issues/new/choose)
- [ ] 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.
- [x] I have done my best to ensure that my PR adheres to [the Fuel Labs
Code Review
Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md).
- [x] I have requested a review from the relevant team or maintainers.

Co-authored-by: Joshua Batty <joshpbatty@gmail.com>
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