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

Compiler: refactor and slightly optimize merging two types #12436

Merged
merged 11 commits into from
Sep 7, 2022

Conversation

asterite
Copy link
Member

@asterite asterite commented Sep 1, 2022

This is mainly a refactor so that two types can be merged without creating intermediate arrays in most cases. I need this refactor for some other things I have in mind.

It also includes some small optimizations to avoid creating intermediate arrays in some cases, but they aren't significant. Well, when compiling the compiler it seems this reduces the total amount of memory by 10MB, so I guess that's good 😄

@asterite
Copy link
Member Author

asterite commented Sep 6, 2022

This one is easier to review by going over each commit.

@straight-shoota straight-shoota added this to the 1.6.0 milestone Sep 6, 2022
@asterite asterite merged commit bfc33db into master Sep 7, 2022
@asterite asterite deleted the opt/type-merge-two branch September 7, 2022 09:50
caspiano added a commit to caspiano/crystal that referenced this pull request Nov 1, 2022
@caspiano caspiano restored the opt/type-merge-two branch November 1, 2022 15:09
caspiano added a commit to caspiano/crystal that referenced this pull request Nov 1, 2022
straight-shoota pushed a commit that referenced this pull request Nov 2, 2022
…types (#12436)" (#12709)

This reverts part of commit bfc33db

The reverted part is 8d19346 (Generalize the case of a non-union type merged with a union type) from #12436
beta-ziliani pushed a commit that referenced this pull request Nov 3, 2022
…types (#12436)" (#12709)

This reverts part of commit bfc33db

The reverted part is 8d19346 (Generalize the case of a non-union type merged with a union type) from #12436
beta-ziliani pushed a commit that referenced this pull request Nov 3, 2022
…types (#12436)" (#12709)

This reverts part of commit bfc33db

The reverted part is 8d19346 (Generalize the case of a non-union type merged with a union type) from #12436
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants