aboutsummaryrefslogtreecommitdiff
path: root/src/jsifier.js
diff options
context:
space:
mode:
authorAlon Zakai <azakai@mozilla.com>2011-02-19 15:45:17 -0800
committerAlon Zakai <azakai@mozilla.com>2011-02-19 15:45:17 -0800
commitf81feaff967ffdd8212ffe2da8579c4734fc7cbb (patch)
treea92d47ad3cad7146c704745426ed661714682a89 /src/jsifier.js
parentf4a934a2adec69bc82c42342c7924fdf259f64cc (diff)
line-specific CORRECT_OVERFLOWS and CORRECT_SIGNS
Diffstat (limited to 'src/jsifier.js')
-rw-r--r--src/jsifier.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/jsifier.js b/src/jsifier.js
index a6ce4c6a..f3e55a39 100644
--- a/src/jsifier.js
+++ b/src/jsifier.js
@@ -758,7 +758,7 @@ function JSify(data, functionsOnly, givenTypes, givenFunctions, givenGlobalVaria
function makeSignOp(value, type, op) { // TODO: If value isNumber, do this at compile time
if (!value) return value;
- if (!CORRECT_SIGNS && !CHECK_SIGNS) return value;
+ if (!correctSigns() && !CHECK_SIGNS) return value;
if (type in Runtime.INT_TYPES) {
var bits = parseInt(type.substr(1));
// shortcuts for 32-bit case
@@ -777,7 +777,7 @@ function JSify(data, functionsOnly, givenTypes, givenFunctions, givenGlobalVaria
function handleOverflow(text, bits) {
if (!bits) return text;
- if (CORRECT_OVERFLOWS && bits <= 32) text = '(' + text + ')&' + (Math.pow(2, bits) - 1);
+ if (bits <= 32 && correctOverflows()) text = '(' + text + ')&' + (Math.pow(2, bits) - 1);
if (!CHECK_OVERFLOWS) return text;
return 'CHECK_OVERFLOW(' + text + ', ' + bits + ')';
}