mirror of
https://github.com/urbit/shrub.git
synced 2024-12-19 16:51:42 +03:00
u3: shortcircuit direct atoms in u3i_chub()
This commit is contained in:
parent
af1325a387
commit
9c550a6795
@ -313,6 +313,10 @@ u3i_word(c3_w dat_w)
|
||||
u3_atom
|
||||
u3i_chub(c3_d dat_d)
|
||||
{
|
||||
if ( c3y == u3a_is_cat(dat_d) ) {
|
||||
return (u3_atom)dat_d;
|
||||
}
|
||||
else {
|
||||
c3_w dat_w[2] = {
|
||||
dat_d & 0xffffffffULL,
|
||||
dat_d >> 32
|
||||
@ -320,6 +324,7 @@ u3i_chub(c3_d dat_d)
|
||||
|
||||
return u3i_words(2, dat_w);
|
||||
}
|
||||
}
|
||||
|
||||
/* u3i_bytes(): Copy [a] bytes from [b] to an LSB first atom.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user