-
-
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
Use enum instead of symbol for Atomic
primitives
#11583
Use enum instead of symbol for Atomic
primitives
#11583
Conversation
@@ -0,0 +1,27 @@ | |||
module LLVM |
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.
Is there any reason for extracting this particular set of enums, and not the others?
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.
This is a partial refactor, including only the enums associated with atomic.
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.
minor comments.
@@ -0,0 +1,27 @@ | |||
module LLVM |
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.
This is a partial refactor, including only the enums associated with atomic.
Moves the LLVM enums to the standard library (as
:nodoc:
types) and relies on autocasting to transport the correct values to code generation. The casing of the enum members is important;:umax
doesn't autocast toUMax
, onlyUmax
.Out of caution, support for symbol parameters / arguments is still there and would be removed after 1.3.0; afterwards, we can use the enums directly without autocasting if we want (it seems the interpreter code might benefit from this).
Atomic::Ops
is not a public API so this shouldn't be considered a breaking change.