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

feat(compiler)!: Remove 32-bit numbers from Number type #1683

Merged
merged 1 commit into from
Feb 26, 2023

Conversation

alex-snezhko
Copy link
Member

Closes #1555, making Int32 and Float32 their own distinct types separate from Number. The most fragile part of these changes is making sure that all of the memory load offsets for these types were corrected, but I am fairly confident that I got them all after sweeping through every instance of 8n in the stdlib/runtime several times and making corrections where necessary 🤞 .

Copy link
Member

@ospencer ospencer left a comment

Choose a reason for hiding this comment

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

Looks pretty good overall, and I love the cleanup in the number runtime! Just a couple small fixes + tests are needed but otherwise this looks good to go. Looks like you'll also need to regen the docs.

stdlib/runtime/compare.gr Outdated Show resolved Hide resolved
stdlib/runtime/equal.gr Outdated Show resolved Hide resolved
stdlib/runtime/numbers.gr Outdated Show resolved Hide resolved
stdlib/runtime/numbers.gr Outdated Show resolved Hide resolved
Copy link
Member

@ospencer ospencer left a comment

Choose a reason for hiding this comment

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

Excellent, thank you! 🥳

Copy link
Member

@phated phated left a comment

Choose a reason for hiding this comment

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

Just need the two coerce functions changes and resolution of the conflicts.

stdlib/float32.gr Outdated Show resolved Hide resolved
stdlib/int32.gr Outdated Show resolved Hide resolved
@phated phated added this pull request to the merge queue Feb 26, 2023
Merged via the queue into grain-lang:main with commit 50bf8ee Feb 26, 2023
av8ta pushed a commit to av8ta/grain that referenced this pull request Apr 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Refactor Int32 and Float32 out of Number
3 participants