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 monomorphization/type resolving code out of TypeCheckContext. #6615

Merged
merged 16 commits into from
Oct 17, 2024

Conversation

tritao
Copy link
Contributor

@tritao tritao commented Oct 7, 2024

Description

This PR mainly refactors some common monomorphization/type resolving code out of TypeCheckContext, to be able to re-use this code for the symbol resolving pass as well, along with some other minor cleanups.

It also helps with code quality in that this file is a big beast and so this makes it a bit more manageable to understand.

Main changes:

Refactor symbol resolve from root into lexical scope.

Refactor monomorphization/type resolving code out of TypeCheckContext.

Extract resolve_qualified_call_path_with_visibility_check_and_modpath to type resolver.

Extract resolve_call_path_with_visibility_check_and_modpath to type resolver.

Refactor type resolver trait into functions.

@tritao tritao self-assigned this Oct 7, 2024
@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 labels Oct 7, 2024
@tritao tritao force-pushed the type-resolve-refactor branch from 5df3f24 to 58c83da Compare October 7, 2024 09:47
Copy link

codspeed-hq bot commented Oct 7, 2024

CodSpeed Performance Report

Merging #6615 will not alter performance

Comparing tritao:type-resolve-refactor (9086173) with master (fa4dac8)

Summary

✅ 22 untouched benchmarks

@tritao tritao force-pushed the type-resolve-refactor branch from 5856586 to b6dd0a3 Compare October 8, 2024 01:21
@tritao tritao requested a review from a team October 8, 2024 01:28
@tritao tritao marked this pull request as ready for review October 8, 2024 01:37
@tritao tritao force-pushed the type-resolve-refactor branch from b6dd0a3 to 1cf0528 Compare October 8, 2024 01:37
@tritao tritao requested review from jjcnn and removed request for mchristopher, Voxelot and luizstacio October 11, 2024 15:47
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.

It all looks good, except for two instances of a single issue that looks odd.

sway-core/src/semantic_analysis/namespace/root.rs Outdated Show resolved Hide resolved
sway-core/src/semantic_analysis/namespace/root.rs Outdated Show resolved Hide resolved
@tritao tritao requested review from jjcnn, esdrubal and a team October 14, 2024 09:45
@IGI-111 IGI-111 requested a review from a team October 17, 2024 20:42
@IGI-111 IGI-111 merged commit 029c593 into FuelLabs:master Oct 17, 2024
40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

3 participants