aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2011-08-28 09:05:15 -0700
committerAlon Zakai <alonzakai@gmail.com>2011-08-28 09:05:15 -0700
commite9f74ecf8800571caf1bfafd98301c9182fcd222 (patch)
treee67cad23bfd6b1926c265bac2dcf68ebd1b64997
parent4b81de94feb02be8fcf7bdf25e969b889d7607c9 (diff)
disable q1 analyses in non-q1 builds
-rw-r--r--src/analyzer.js36
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];