Follow my own advice and write any 32-bit hex constant > 0x7fffffff as (constant|0)

The Closure Compiler does a fine job of replacing all such expressions with their decimal equivalent, relieving us from having to calculate them ourselves, and eliminating any runtime impact
This commit is contained in:
Jeff Parsons 2015-02-19 11:18:40 -08:00 • committed by jeffpar
commit c8aec14b0b
153 changed files with 6296 additions and 188 deletions

View file

@ -2133,10 +2133,10 @@ X86CPU.prototype.setLong = function(addr, l)
var lPrev, nShift = (off & 0x3) << 3;
off &= ~0x3;
lPrev = this.aMemBlocks[iBlock].readLong(off);
this.aMemBlocks[iBlock].writeLong(off, (lPrev & ~(0xffffffff << nShift)) | (l << nShift));
this.aMemBlocks[iBlock].writeLong(off, (lPrev & ~(-1 << nShift)) | (l << nShift));
iBlock = (iBlock + 1) & this.blockMask;
lPrev = this.aMemBlocks[iBlock].readLong(0);
this.aMemBlocks[iBlock].writeLong(0, (lPrev & (0xffffffff << nShift)) | (l >>> (32 - nShift)));
this.aMemBlocks[iBlock].writeLong(0, (lPrev & (-1 << nShift)) | (l >>> (32 - nShift)));
};
/**