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

Implement recursion analysis for impl self method calls #4954

Closed
tritao opened this issue Aug 15, 2023 · 1 comment · Fixed by #5210
Closed

Implement recursion analysis for impl self method calls #4954

tritao opened this issue Aug 15, 2023 · 1 comment · Fixed by #5210
Assignees
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 enhancement New feature or request

Comments

@tritao
Copy link
Contributor

tritao commented Aug 15, 2023

As title says, this tracks implementation of recursion analysis for impl self method calls.

@tritao tritao added enhancement New feature or request 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 Aug 15, 2023
@tritao tritao self-assigned this Aug 15, 2023
@tritao
Copy link
Contributor Author

tritao commented Sep 12, 2023

Initial implementation in 379263b.

tritao added a commit that referenced this issue Dec 1, 2023
…5210)

## Description

This PR introduces a new recursive analysis pass, which is implemented
for for regular and impl traits functions.

It works computing a dependency graph, and then running the Johnson
graph cycle finding algorithm in the graph.

Regular functions still use the old recursive analysis pass due to
issues with disabling the old dependency pass. When disabling the old
recursion analysis code for regular functions, we get a stack overflow
in the existing dependency map building code, which is shared with the
existing type recursion analysis code.

Closes #4954.

## Checklist

- [x] I have linked to any relevant issues.
- [x] I have commented my code, particularly in hard-to-understand
areas.
- [x] I have updated the documentation where relevant (API docs, the
reference, and the Sway book).
- [x] I have added tests that prove my fix is effective or that my
feature works.
- [x] 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>
Co-authored-by: Sophie Dankel <47993817+sdankel@users.noreply.github.com>
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 enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant