aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2011-06-08 19:09:15 -0700
committerAlon Zakai <alonzakai@gmail.com>2011-06-08 19:09:15 -0700
commit9ca17c7439a153e605e739d4ecc2fa42b6870d7d (patch)
treedbae663156fe070d4527caf095af084fe19fa926
parent2769a72f518952e359b7d7ddb4a8ebea360122b6 (diff)
optimize 32bit unsign
-rw-r--r--src/parseTools.js6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/parseTools.js b/src/parseTools.js
index fab3eccd..1311f8d3 100644
--- a/src/parseTools.js
+++ b/src/parseTools.js
@@ -1027,11 +1027,7 @@ function makeSignOp(value, type, op) {
if (op === 're') {
return '((' + value + ')|0)';
} else {
- // If this is an ident, we can shortcut. If not, our shortcut could
- // lead to multiple evaluation, so give up
- if (isNiceIdent(value, true)) {
- return '(' + value + ' >= 0 ? ' + value + ' : (' + value + '+' + (2*Math.abs(1 << 31)) + '))';
- }
+ return '((' + value + ')>>>0)';
}
}
return op + 'Sign(' + value + ', ' + bits + ', ' + Math.floor(correctSpecificSign() && !AUTO_OPTIMIZE) + (