aboutsummaryrefslogtreecommitdiff
path: root/src/intertyper.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-09-27 21:51:32 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-09-27 21:51:32 -0700
commit51256ab4452f9b1aa3774ef2eece26faa652ab22 (patch)
tree019b542b42fb39ebe9c6b3cece2deaa4747533cc /src/intertyper.js
parent9a7389a86d9209e9fdda6da6578a7acdcf590eb1 (diff)
make sure to only fast-path stuff we expect
Diffstat (limited to 'src/intertyper.js')
-rw-r--r--src/intertyper.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/intertyper.js b/src/intertyper.js
index 5ffc20dd..07f2020c 100644
--- a/src/intertyper.js
+++ b/src/intertyper.js
@@ -1013,7 +1013,7 @@ function intertyper(lines, sidePass, baseLineNums) {
noteGlobalVariable(ret);
}
} else if (phase === 'funcs') {
- if (m = /^ (%[\w\d\._]+) = (\w+) ([%\w\d\._ ,\*\-@]+)$/.exec(line.lineText)) {
+ if (m = /^ (%[\w\d\._]+) = (getelementptr|load) ([%\w\d\._ ,\*\-@]+)$/.exec(line.lineText)) {
var assignTo = m[1];
var intertype = m[2];
var args = m[3];
@@ -1067,6 +1067,7 @@ function intertyper(lines, sidePass, baseLineNums) {
}
break;
}
+ default: throw 'unexpected fast path type ' + intertype;
}
//else if (line.lineText.indexOf(' = load ') > 0) printErr('close: ' + JSON.stringify(line.lineText));
}