diff options
author | Alon Zakai <alonzakai@gmail.com> | 2011-11-17 10:16:42 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2011-11-17 10:16:42 -0800 |
commit | acccc5e85ada70e963934bdf21dfeb501fe63d98 (patch) | |
tree | 70ca077bdff35d4243245cc8fd81dfaf80021413 /src/parseTools.js | |
parent | bcf1a4f0e90b93a7771058fda56e4be1046af38a (diff) |
refactor PGO code
Diffstat (limited to 'src/parseTools.js')
-rw-r--r-- | src/parseTools.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/parseTools.js b/src/parseTools.js index 423ed0cb..d7514ef5 100644 --- a/src/parseTools.js +++ b/src/parseTools.js @@ -1342,8 +1342,8 @@ function handleOverflow(text, bits) { if (!bits) return text; var correct = correctOverflows(); warn(!correct || bits <= 32, 'Cannot correct overflows of this many bits: ' + bits + ' at line ' + Framework.currItem.lineNum); - if (CHECK_OVERFLOWS) return 'CHECK_OVERFLOW(' + text + ', ' + bits + ', ' + Math.floor(correctSpecificOverflow() && !AUTO_OPTIMIZE) + ( - AUTO_OPTIMIZE ? ', "' + Debugging.getIdentifier() + '"' : '' + if (CHECK_OVERFLOWS) return 'CHECK_OVERFLOW(' + text + ', ' + bits + ', ' + Math.floor(correctSpecificOverflow() && !PGO) + ( + PGO ? ', "' + Debugging.getIdentifier() + '"' : '' ) + ')'; if (!correct) return text; if (bits <= 32) { @@ -1398,8 +1398,8 @@ function makeSignOp(value, type, op, force) { var bits, full; if (type in Runtime.INT_TYPES) { bits = parseInt(type.substr(1)); - full = op + 'Sign(' + value + ', ' + bits + ', ' + Math.floor(correctSpecificSign() && !AUTO_OPTIMIZE) + ( - AUTO_OPTIMIZE ? ', "' + Debugging.getIdentifier() + '"' : '' + full = op + 'Sign(' + value + ', ' + bits + ', ' + Math.floor(correctSpecificSign() && !PGO) + ( + PGO ? ', "' + Debugging.getIdentifier() + '"' : '' ) + ')'; // Always sign/unsign constants at compile time, regardless of CHECK/CORRECT if (isNumber(value)) { |