aboutsummaryrefslogtreecommitdiff
path: root/src/analyzer.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2011-08-31 17:53:41 -0700
committerAlon Zakai <alonzakai@gmail.com>2011-08-31 17:53:41 -0700
commit7565b00cce206bb7fd8899ba121e412996d0d8e2 (patch)
tree3389e5916e24b65edb8e6dd1b293f4f8240e6282 /src/analyzer.js
parent1e7f45eb40bf8597ae7b1263e9e546737979851c (diff)
initial work to support resume, landingpad and insertvalue
Diffstat (limited to 'src/analyzer.js')
-rw-r--r--src/analyzer.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/analyzer.js b/src/analyzer.js
index 8e8f8ac7..4e49c7a4 100644
--- a/src/analyzer.js
+++ b/src/analyzer.js
@@ -46,6 +46,7 @@ function analyzer(data) {
// Functions & labels
item.functions = [];
var currLabelFinished; // Sometimes LLVM puts a branch in the middle of a label. We need to ignore all lines after that.
+ item.items.sort(function(a, b) { return a.lineNum - b.lineNum });
for (var i = 0; i < item.items.length; i++) {
var subItem = item.items[i];
if (subItem.intertype == 'function') {
@@ -80,7 +81,7 @@ function analyzer(data) {
print('// WARNING: content after a branch in a label, line: ' + subItem.lineNum);
}
} else {
- print("ERROR: what is this? " + JSON.stringify(subItem));
+ throw "ERROR: what is this? " + JSON.stringify(subItem);
}
}
delete item.items;