-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Labels
Milestone
Description
Describe the feature
I recently I encountered a & 0xfffffffc in my codebase (blanks out the lower 2 bits to align to a 4 byte boundary in base64 decoding).
This could be a & -4 instead.
This applies to all bitwise operations but I haven't encountered others with such high values so far.
Although there's some cases where staying positive is actually shorter (eg a & 0x80000000 is shorter than a & -0x80000000 which would be the correct "in bounds" literal)
Babel plugin or link to the feature description
Additional context
No response