aboutsummaryrefslogtreecommitdiff
path: root/src/analyzer.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-10-26 11:17:52 -0700
committerAlon Zakai <alonzakai@gmail.com>2012-10-26 11:17:52 -0700
commit60b7e38828c12c872a6b9daa90564df70dbaa2f6 (patch)
tree0d54dfa39a17af1f19cc28ee911bb92cb6656776 /src/analyzer.js
parent842b975052eb9bcfa2f86a6a8b9968e8ade0cede (diff)
do not do signalyzer pass if sign correction is on - it can only hurt there
Diffstat (limited to 'src/analyzer.js')
-rw-r--r--src/analyzer.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/analyzer.js b/src/analyzer.js
index 9d060a2c..1849b58d 100644
--- a/src/analyzer.js
+++ b/src/analyzer.js
@@ -969,7 +969,8 @@ function analyzer(data, sidePass) {
//
// Analyze our variables and detect their signs. In USE_TYPED_ARRAYS == 2,
// we can read signed or unsigned values and prevent the need for signing
- // corrections.
+ // corrections. If on the other hand we are doing corrections anyhow, then
+ // we can skip this pass.
//
// For each variable that is the result of a Load, we look a little forward
// to see where it is used. We only care about mathops, since only they
@@ -978,7 +979,7 @@ function analyzer(data, sidePass) {
substrate.addActor('Signalyzer', {
processItem: function(item) {
this.forwardItem(item, 'QuantumFixer');
- if (USE_TYPED_ARRAYS !== 2) return;
+ if (USE_TYPED_ARRAYS != 2 || CORRECT_SIGNS == 1) return;
function seekIdent(item, obj) {
if (item.ident === obj.ident) {