diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-09-27 21:51:32 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-09-27 21:51:32 -0700 |
commit | 51256ab4452f9b1aa3774ef2eece26faa652ab22 (patch) | |
tree | 019b542b42fb39ebe9c6b3cece2deaa4747533cc | |
parent | 9a7389a86d9209e9fdda6da6578a7acdcf590eb1 (diff) |
make sure to only fast-path stuff we expect
-rw-r--r-- | src/intertyper.js | 3 |
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)); } |