aboutsummaryrefslogtreecommitdiff
path: root/src/analyzer.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2011-05-24 15:07:49 -0700
committerAlon Zakai <alonzakai@gmail.com>2011-05-24 15:07:49 -0700
commitbcdfcfbfed3d6946a1811b17a1f77e0fb8d0fc25 (patch)
tree380a661fae739a3374d976da5d14c83fe3ed0624 /src/analyzer.js
parent77cacaa2fd27bcc1265f2f7255b18c3461e0ddff (diff)
remove obsolete fastops; generalize load with parseLLVM/finalizeLLVM; fix issue 14
Diffstat (limited to 'src/analyzer.js')
-rw-r--r--src/analyzer.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/analyzer.js b/src/analyzer.js
index 74d4e402..e48395c6 100644
--- a/src/analyzer.js
+++ b/src/analyzer.js
@@ -258,12 +258,12 @@ function analyzer(data) {
// Normal variables
func.lines.forEach(function(item) {
- if (item.intertype in set('assign', 'fastgetelementptrload')) {
+ if (item.intertype === 'assign') {
if (!item.value.tokens.slice(-1)[0].item) throw 'Did you run llvm-dis with -show-annotations?';
func.variables[item.ident] = {
ident: item.ident,
type: item.value.type,
- origin: item.intertype === 'assign' ? item.value.intertype : 'fastgetelementptrload',
+ origin: item.value.intertype,
lineNum: item.lineNum,
uses: parseInt(item.value.tokens.slice(-1)[0].item.tokens[0].text.split('=')[1])
};
@@ -314,8 +314,7 @@ function analyzer(data) {
//print(dump(line))
if (line.intertype == 'store' && line.ident == vname) {
variable.stores ++;
- } else if ((line.intertype == 'assign' && line.value.intertype == 'load' && line.value.ident == vname) ||
- (line.intertype == 'fastgetelementptrload' && line.ident == vname)) {
+ } else if (line.intertype == 'assign' && line.value.intertype == 'load' && line.value.ident == vname) {
variable.loads ++;
}
});