diff options
author | max99x <max99x@gmail.com> | 2011-09-13 02:14:32 +0300 |
---|---|---|
committer | max99x <max99x@gmail.com> | 2011-09-13 02:14:32 +0300 |
commit | c5e5c90cd111c08b3d91d1bc89ba7d33a308cbc7 (patch) | |
tree | 5c6033729c4a4c5593fcd87bd9ffa6debf21f285 /src/analyzer.js | |
parent | 91e29b31f280b879b10debf2194c2b87d94857cf (diff) | |
parent | 534cc7f05846daa88f2d3f2d149d9768262033e9 (diff) |
Merge remote-tracking branch 'upstream/master'
Conflicts:
src/intertyper.js
tests/runner.py
Diffstat (limited to 'src/analyzer.js')
-rw-r--r-- | src/analyzer.js | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/src/analyzer.js b/src/analyzer.js index 96e6297b..824e7903 100644 --- a/src/analyzer.js +++ b/src/analyzer.js @@ -275,25 +275,27 @@ function analyzer(data) { } }); - // Second pass over variables - notice when types are crossed by bitcast - - func.lines.forEach(function(item) { - if (item.intertype === 'assign' && item.value.intertype === 'bitcast') { - // bitcasts are unique in that they convert one pointer to another. We - // sometimes need to know the original type of a pointer, so we save that. - // - // originalType is the type this variable is created from - // derivedTypes are the types that this variable is cast into - func.variables[item.ident].originalType = item.value.type2; - - if (!isNumber(item.value.ident)) { - if (!func.variables[item.value.ident].derivedTypes) { - func.variables[item.value.ident].derivedTypes = []; + if (QUANTUM_SIZE === 1) { + // Second pass over variables - notice when types are crossed by bitcast + + func.lines.forEach(function(item) { + if (item.intertype === 'assign' && item.value.intertype === 'bitcast') { + // bitcasts are unique in that they convert one pointer to another. We + // sometimes need to know the original type of a pointer, so we save that. + // + // originalType is the type this variable is created from + // derivedTypes are the types that this variable is cast into + func.variables[item.ident].originalType = item.value.type2; + + if (!isNumber(item.value.ident)) { + if (!func.variables[item.value.ident].derivedTypes) { + func.variables[item.value.ident].derivedTypes = []; + } + func.variables[item.value.ident].derivedTypes.push(item.value.type); } - func.variables[item.value.ident].derivedTypes.push(item.value.type); } - } - }); + }); + } for (vname in func.variables) { var variable = func.variables[vname]; |