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

effects: Improve is_mutation_free_type to also include immutable type… #48220

Merged
merged 2 commits into from
Jan 11, 2023

Conversation

Keno
Copy link
Member

@Keno Keno commented Jan 11, 2023

…s thereof

Addresses an outstanding todo. The property is memoized in the datatype like isbitstype. It is possible for types to refer to themselves via fields, so some form of memoization is required to avoid an infinite recursion.

@Keno
Copy link
Member Author

Keno commented Jan 11, 2023

Turns out the original change was insufficient and I had to do the same thing for is_consistent_type also, so I pushed that commit here also.

Copy link
Member

@aviatesk aviatesk left a comment

Choose a reason for hiding this comment

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

LGTM.

Copy link
Member

@vtjnash vtjnash left a comment

Choose a reason for hiding this comment

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

SGTM

Keno added 2 commits January 11, 2023 04:48
…s thereof

Addresses an outstanding todo. The property is memoized in the datatype
like `isbitstype`. It is possible for types to refer to themselves
via fields, so some form of memoization is required to avoid an
infinite recursion.
I called the data type property `isidentityfree`, which I think
more accurately reflects what is being queried here.
@Keno Keno force-pushed the kf/ismutationfree branch from e9e79d6 to 318828c Compare January 11, 2023 04:49
@Keno Keno merged commit a526a4a into master Jan 11, 2023
@Keno Keno deleted the kf/ismutationfree branch January 11, 2023 15:23
aviatesk added a commit that referenced this pull request Jan 11, 2023
- set up the `isidentityfree` query as `ismutationfree` and refactor
  `is_consistent_type` a bit using it
- move the special handling of `Module`-type's `mutationfree` bit to
  `Core.Compiler` since it is entangled with the implementation detail
  within `Core.Compiler`
aviatesk added a commit that referenced this pull request Jan 11, 2023
- set up the `isidentityfree` query as `ismutationfree` and refactor
  `is_consistent_type` a bit using it
- move the special handling of `Module`-type's `mutationfree` bit to
  `Core.Compiler` since it is entangled with the implementation detail
  within `Core.Compiler`
aviatesk added a commit that referenced this pull request Jan 12, 2023
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