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

Store initializer exprs for Structs in ASR #2056

Merged
merged 8 commits into from
Jun 30, 2023

Conversation

Smit-create
Copy link
Collaborator

No description provided.

@Smit-create
Copy link
Collaborator Author

@certik This is an alternative approach to #2013 and I think this is more robust and doesn't create any confusion.

@certik
Copy link
Contributor

certik commented Jun 29, 2023

I think that this is fine. Isn't it equivalent to store an iniitalizer in the Variable (inside a struct) or in the Struct?

@Smit-create
Copy link
Collaborator Author

I think that this is fine. Isn't it equivalent to store an iniitalizer in the Variable (inside a struct) or in the Struct?

Yeah, that works. But it would require a lot of methods to be moved in CommonVisitor and may create problems of visiting them again in BodyVisitor which may affect the performance.

@Smit-create Smit-create mentioned this pull request Jun 30, 2023
@Smit-create Smit-create requested a review from certik June 30, 2023 06:44
@Smit-create Smit-create marked this pull request as ready for review June 30, 2023 06:44
@Smit-create
Copy link
Collaborator Author

@certik This PR fixes all the issues related to #1981, and #2013. Moreover, also fixes the test in #2058.

Copy link
Contributor

@certik certik left a comment

Choose a reason for hiding this comment

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

Ok. I think this PR is reasonably clean and doesn't require major refactor. So let's merge it. I think this still keeps the door open to refactor things later if we figure out a better design.

@certik certik merged commit e642072 into lcompilers:main Jun 30, 2023
8 checks passed
@Smit-create Smit-create deleted the i-1981-1 branch June 30, 2023 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants