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

Remove redundant index type from Expr::For #66

Merged
merged 1 commit into from
Aug 7, 2023
Merged

Conversation

samestep
Copy link
Contributor

@samestep samestep commented Aug 4, 2023

While simplifying the compound instructions in #64, I didn't realize that the index field of Expr::For is redundant, because it's always going to be the same as the type of arg. This PR removes that redundant index field.

All the resulting changes here are uninteresting, with the possible exception of rose-interp: we add a new call to the .def() method on the FuncNode. This should be fine because conventionally this method is very cheap, but perhaps later we might want to modify the interpreter to keep a direct reference to the function instead of just the FuncNode; this is the strategy used in #53, for instance.

@samestep samestep requested a review from ravenrothkopf August 4, 2023 16:50
Copy link
Contributor

@ravenrothkopf ravenrothkopf left a comment

Choose a reason for hiding this comment

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

nice!! sorry for the delayed review

@samestep samestep merged commit e5a34e8 into main Aug 7, 2023
@samestep samestep deleted the for-implicit-type branch August 7, 2023 13:50
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.

2 participants