Initial work of ESM transformation

This commit is contained in:
be5invis 2022-07-16 19:26:49 -07:00
parent 2472c9cff2
commit b8205a63aa
303 changed files with 1959 additions and 2450 deletions

View file

@ -0,0 +1,10 @@
const pcNibbleLookup = [0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4];
export function maskBit(x, y) {
return x & (1 << y);
}
export function maskBits(x, y) {
return x & y;
}
export const popCountByte = function (x) {
return pcNibbleLookup[x & 0x0f] + pcNibbleLookup[(x >>> 4) & 0x0f];
};