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

chore(compiler): Make locs on anf_helper non optional #1942

Merged
merged 2 commits into from
Jul 28, 2024

Conversation

spotandjake
Copy link
Member

This pr makes locations non optional on anf_helper.

I think after this is merged we might want to open an issue to go through and evaluate the use of Location.dummy_loc throughout the compiler.

phated
phated previously requested changes Dec 31, 2023
Copy link
Member

@phated phated left a comment

Choose a reason for hiding this comment

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

Thanks for doing this @spotandjake! I wonder if it is actually better to use this diff as a way for @ospencer and @peblair to inventory the usage of dummy_loc 🤔

@spotandjake
Copy link
Member Author

Thanks for doing this @spotandjake! I wonder if it is actually better to use this diff as a way for @ospencer and @peblair to inventory the usage of dummy_loc 🤔

There are other cases of it being used in the compiler that I think might be worth inventorying as well.

Copy link
Member

@ospencer ospencer left a comment

Choose a reason for hiding this comment

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

Did inventory of the usage of dummy_loc here. Caught a couple, though by nature of what's happening in the linearization/matchcomp phase we're generating a number of expressions that don't have corresponding locations in the source tree. In the future we may decide to handle those differently (maybe just trying to attribute it to the closest node or something).

@ospencer ospencer dismissed phated’s stale review July 28, 2024 15:24

Inventory complete

@ospencer ospencer enabled auto-merge July 28, 2024 15:24
@ospencer ospencer added this pull request to the merge queue Jul 28, 2024
Merged via the queue into grain-lang:main with commit ff280a1 Jul 28, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants