-
Notifications
You must be signed in to change notification settings - Fork 38
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
jets: for new atom ops #627
Conversation
pkg/noun/hashtable.c
Outdated
static c3_w | ||
_ch_popcount(c3_w num_w) | ||
{ | ||
return __builtin_popcount(num_w); | ||
return c3_pc_w(num_w); | ||
} |
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.
Why not just remove this function entirely, if it only calls an alias to a built-in?
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.
I was just minimizing the diff, but it'd be better to refactor and this is probably a fine place to do so.
pkg/noun/jets/c/clz.c
Outdated
wor_w &= (1 << bit_w) - 1; | ||
|
||
if ( wor_w ) { | ||
return bit_w - (32 - c3_lz_w(wor_w)); |
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.
They come out to the same thing, but I think the relationship is a lot clearer when expressed as:
[# leading 0s] - (32 - [# bits])
Adds jets for the operations in urbit/urbit#6961, to support urbit/urbit#6932.