Consider merging the entire resolution phase within the fixed-point loop
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 355
- Forks
- 24
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 17
Description
We've been hitting some edge cases where we need to do post-loop processing, like resolving instance variable references and attaching them to their respective declarations. I'm starting to suspect that there's actually a better way to structure this if we include everything inside the loop.
We originally set things up as resolution loop + handle other definitions to ensure dependency ordering. If we find an unresolved constant reference while handling other definitions, we know we couldn't resolve it for sure. The problem is that we're now getting more and more post steps, like handling method visibility and instance variable references.
We might be able to merge everything into a single loop, which can hopefully simplify some of these steps. It may require better dependency tracking or sorting of operations. Investigate if this is possible and if the trade offs are favourable. Do we get better performance? Is the code easier to manage?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Trace the existing resolution loop, the handling of other definitions, and the post-loop processing described in the issue. Compare a single fixed-point loop with the current dependency ordering, evaluating implementation complexity and performance; done means a documented conclusion about whether merging the phases is worthwhile and what dependency tracking it would require.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100