diff options
Diffstat (limited to 'src/parseTools.js')
-rw-r--r-- | src/parseTools.js | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/src/parseTools.js b/src/parseTools.js index e081d0de..ca9ad40a 100644 --- a/src/parseTools.js +++ b/src/parseTools.js @@ -976,12 +976,6 @@ function checkSafeHeap() { return SAFE_HEAP === 1 || checkSpecificSafeHeap(); } -if (ASM_JS) { - var hexMemoryMask = '0x' + (TOTAL_MEMORY-1).toString(16); - var decMemoryMask = (TOTAL_MEMORY-1).toString(); - var memoryMask = hexMemoryMask.length <= decMemoryMask.length ? hexMemoryMask : decMemoryMask; -} - function getHeapOffset(offset, type, forceAsm) { if (USE_TYPED_ARRAYS !== 2) { return offset; @@ -991,7 +985,6 @@ function getHeapOffset(offset, type, forceAsm) { } var shifts = Math.log(Runtime.getNativeTypeSize(type))/Math.LN2; offset = '(' + offset + ')'; - if (ASM_JS && (phase == 'funcs' || forceAsm)) offset = '(' + offset + '&' + memoryMask + ')'; if (shifts != 0) { return '(' + offset + '>>' + shifts + ')'; } else { @@ -1070,7 +1063,6 @@ function makeGetTempDouble(i, type, forSet) { // get an aliased part of the temp var ptr = getFastValue('tempDoublePtr', '+', Runtime.getNativeTypeSize(type)*i); var offset; if (type == 'double') { - if (ASM_JS) ptr = '(' + ptr + ')&' + memoryMask; offset = '(' + ptr + ')>>3'; } else { offset = getHeapOffset(ptr, type); @@ -1717,9 +1709,7 @@ function handleOverflow(text, bits) { if (!bits) return text; var correct = correctOverflows(); warnOnce(!correct || bits <= 32, 'Cannot correct overflows of this many bits: ' + bits); - if (CHECK_OVERFLOWS) return 'CHECK_OVERFLOW(' + text + ', ' + bits + ', ' + Math.floor(correctSpecificOverflow() && !PGO) + ( - PGO ? ', "' + Debugging.getIdentifier() + '"' : '' - ) + ')'; + if (CHECK_OVERFLOWS) return 'CHECK_OVERFLOW(' + text + ', ' + bits + ', ' + Math.floor(correctSpecificOverflow()) + ')'; if (!correct) return text; if (bits == 32) { return '((' + text + ')|0)'; @@ -1827,9 +1817,7 @@ function makeSignOp(value, type, op, force, ignore) { var bits, full; if (type in Runtime.INT_TYPES) { bits = parseInt(type.substr(1)); - full = op + 'Sign(' + value + ', ' + bits + ', ' + Math.floor(ignore || (correctSpecificSign() && !PGO)) + ( - PGO ? ', "' + (ignore ? '' : Debugging.getIdentifier()) + '"' : '' - ) + ')'; + full = op + 'Sign(' + value + ', ' + bits + ', ' + Math.floor(ignore || (correctSpecificSign())) + ')'; // Always sign/unsign constants at compile time, regardless of CHECK/CORRECT if (isNumber(value)) { return eval(full).toString(); |