aboutsummaryrefslogtreecommitdiff
path: root/src/parseTools.js
diff options
context:
space:
mode:
authorAlon Zakai <azakai@mozilla.com>2011-03-04 20:02:31 -0800
committerAlon Zakai <azakai@mozilla.com>2011-03-04 20:02:31 -0800
commit1545aaf14f7ce5a92c5acec23687742d0d4fa0ec (patch)
treeeeceb9e8882aac1eaac1068789866ac0c19883c3 /src/parseTools.js
parent46691ad5cd94f1a629ac747831e9572b3661682e (diff)
integer rounding fixes and CORRECT_ROUNDINGS option
Diffstat (limited to 'src/parseTools.js')
-rw-r--r--src/parseTools.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/parseTools.js b/src/parseTools.js
index 8b30554d..be3a6b4c 100644
--- a/src/parseTools.js
+++ b/src/parseTools.js
@@ -564,10 +564,18 @@ function correctSigns() {
}
function correctSpecificOverflow() {
- assert(!(CORRECT_SIGNS === 2 && !Debugging.on), 'Need debugging for line-specific corrections');
+ assert(!(CORRECT_OVERFLOWS === 2 && !Debugging.on), 'Need debugging for line-specific corrections');
return CORRECT_OVERFLOWS === 2 && Debugging.getIdentifier(Framework.currItem.lineNum) in CORRECT_OVERFLOWS_LINES;
}
function correctOverflows() {
return CORRECT_OVERFLOWS === 1 || correctSpecificOverflow();
}
+function correctSpecificRounding() {
+ assert(!(CORRECT_ROUNDINGS === 2 && !Debugging.on), 'Need debugging for line-specific corrections');
+ return CORRECT_ROUNDINGS === 2 && Debugging.getIdentifier(Framework.currItem.lineNum) in CORRECT_ROUNDINGS_LINES;
+}
+function correctRoundings() {
+ return CORRECT_ROUNDINGS === 1 || correctSpecificRounding();
+}
+