aboutsummaryrefslogtreecommitdiff
path: root/src/analyzer.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/analyzer.js')
-rw-r--r--src/analyzer.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/analyzer.js b/src/analyzer.js
index 8f4ba95e..0cb89eda 100644
--- a/src/analyzer.js
+++ b/src/analyzer.js
@@ -217,6 +217,17 @@ function analyzer(data, givenTypes) {
// Variable analyzer
substrate.addActor('VariableAnalyzer', {
processItem: function(item) {
+ // Globals
+
+ var old = item.globalVariables;
+ item.globalVariables = {};
+ old.forEach(function(variable) {
+ variable.impl = 'emulated'; // All global variables are emulated, for now. Consider optimizing later if useful
+ item.globalVariables[variable.ident] = variable;
+ });
+
+ // Function locals
+
item.functions.forEach(function(func) {
dprint('vars', 'Analyzing variables in ' + func.ident);