Unified · Split
| @@ -5,8 +5,6 @@ · 4 unmodified lines | |||
| 5 | sl_v | 5 | sl_v |
| 6 | nextipow2(sl_v a) | 6 | nextipow2(sl_v a) |
| 7 | { | 7 | { |
| 8 | if(sl_unlikely(a == 0)) | ||
| 9 | return 1; | ||
| 10 | a |= a >> 1; | 8 | a |= a >> 1; |
| 11 | a |= a >> 2; | 9 | a |= a >> 2; |
| 12 | a |= a >> 4; | 10 | a |= a >> 4; |
| @@ -16,7 +14,8 @@ nextipow2(sl_v a) · 3 unmodified lines | |||
| 16 | a |= a >> 32; | 14 | a |= a >> 32; |
| 17 | #endif | 15 | #endif |
| 18 | a++; | 16 | a++; |
| 19 | return a ? a : TOP_BIT; | 17 | assert(a != 0); |
| 18 | return a; | ||
| 20 | } | 19 | } |
| 21 | 20 | ||
| 22 | sl_v | 21 | sl_v |
| @@ -73,14 +73,12 @@ typedef enum { · 72 unmodified lines | |||
| 73 | typedef s64int sl_fx; | 73 | typedef s64int sl_fx; |
| 74 | #define FIXNUM_BITS (64-TAG_BITS) | 74 | #define FIXNUM_BITS (64-TAG_BITS) |
| 75 | #define UNBOXED_BITS (64-TAG_EXT_BITS) | 75 | #define UNBOXED_BITS (64-TAG_EXT_BITS) |
| 76 | #define TOP_BIT (1ULL<<63) | ||
| 77 | #define T_FIXNUM T_S64 | 76 | #define T_FIXNUM T_S64 |
| 78 | #define PRIdFIXNUM PRId64 | 77 | #define PRIdFIXNUM PRId64 |
| 79 | #else | 78 | #else |
| 80 | typedef s32int sl_fx; | 79 | typedef s32int sl_fx; |
| 81 | #define FIXNUM_BITS (32-TAG_BITS) | 80 | #define FIXNUM_BITS (32-TAG_BITS) |
| 82 | #define UNBOXED_BITS (32-TAG_EXT_BITS) | 81 | #define UNBOXED_BITS (32-TAG_EXT_BITS) |
| 83 | #define TOP_BIT (1U<<31) | ||
| 84 | #define T_FIXNUM T_S32 | 82 | #define T_FIXNUM T_S32 |
| 85 | #define PRIdFIXNUM PRId32 | 83 | #define PRIdFIXNUM PRId32 |
| 86 | #endif | 84 | #endif |