-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Overflow prepare compiler #7262
Overflow prepare compiler #7262
Conversation
If the last value was 1 << 31 an overflow would be thrown. This is not changing the current behavior. The Enum flags with UInt64 base type work only if the values are explicit.
Otherwise OverflowError and raise method will need to be defined
end | ||
else | ||
counter + 1 | ||
counter &+ 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An issue to fix or discuss this behaviour should be created.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done at #7268. Is there any other feedback of the changes of the PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, the PR is good! Thanks!
The PR updates the stdlib to use unchecked operations & conversions where needed.
It's easier to review per commit than per changes.
compiler_specs need to use
&+
rather than+
or including prelude would be required.The
to_X!
operations are used when calling libs instead ofto_X
.