aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-01-14 12:00:15 -0800
committerAlon Zakai <alonzakai@gmail.com>2012-01-14 12:00:15 -0800
commit39abd6568309834686abc7bcd7769d18849ba4a7 (patch)
tree33f79f7bcc80581049925d8ccc9c6aa9c7cd4e84
parentf4e533ee6b1025aa700059b7918cfa90f8d75c47 (diff)
optimize relooper by calculating only allInLabels and inferring allOutLabels from that
-rw-r--r--src/analyzer.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/analyzer.js b/src/analyzer.js
index e58d0e40..a5b7169c 100644
--- a/src/analyzer.js
+++ b/src/analyzer.js
@@ -962,11 +962,16 @@ function analyzer(data, sidePass) {
}
}
inout('inLabels', 'allInLabels');
- inout('outLabels', 'allOutLabels');
});
}
labels.forEach(function(label) {
+ label.allInLabels.forEach(function(inLabelId) {
+ labelsDict[inLabelId].allOutLabels.push(label.ident);
+ });
+ });
+
+ labels.forEach(function(label) {
if (dcheck('relooping')) {
dprint('// label: ' + label.ident + ' :out : ' + JSON.stringify(label.outLabels));
dprint('// ' + label.ident + ' :in : ' + JSON.stringify(label.inLabels));