diff options
author | Alon Zakai <alonzakai@gmail.com> | 2011-11-26 18:49:16 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2011-11-26 18:49:16 -0800 |
commit | d9af31471571b868b7a7da57e7d9f14d2f52bd5a (patch) | |
tree | b5bc58ae79b06bcc7fb939a27f4101333a3b0a43 | |
parent | 11552c29713ee2a04470accd652d1f842060a33f (diff) |
optimize overflow correction for 32 bits
-rw-r--r-- | src/parseTools.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/parseTools.js b/src/parseTools.js index aa1c37b1..7060dc3e 100644 --- a/src/parseTools.js +++ b/src/parseTools.js @@ -1414,7 +1414,9 @@ function handleOverflow(text, bits) { PGO ? ', "' + Debugging.getIdentifier() + '"' : '' ) + ')'; if (!correct) return text; - if (bits <= 32) { + if (bits == 32) { + return '((' + text + ')|0)'; + } else if (bits < 32) { return '((' + text + ')&' + (Math.pow(2, bits) - 1) + ')'; } else { return text; // We warned about this earlier |