aboutsummaryrefslogtreecommitdiff
path: root/src/jsifier.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/jsifier.js')
-rw-r--r--src/jsifier.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/jsifier.js b/src/jsifier.js
index 48fb7968..099fa4c6 100644
--- a/src/jsifier.js
+++ b/src/jsifier.js
@@ -99,12 +99,14 @@ function JSify(data, functionsOnly, givenFunctions, givenGlobalVariables) {
for (var i = 0; i < data.unparsedFunctions.length; i++) {
var func = data.unparsedFunctions[i];
+ // We don't need to save anything past here
+ data.unparsedFunctions[i] = null;
dprint('unparsedFunctions', '====================\n// Processing |' + func.ident + '|, ' + i + '/' + data.unparsedFunctions.length);
+ if (DEBUG_MEMORY) MemoryDebugger.tick('pre-func ' + func.ident);
JSify(analyzer(intertyper(func.lines, true, func.lineNum-1)), true, Functions, GLOBAL_VARIABLES);
- // We don't need to save anything here, the function has printed itself out and can now be forgotten
- data.unparsedFunctions[i] = null;
- //if (DEBUG_MEMORY) MemoryDebugger.tick('func ' + i + '|' + func.ident + (i == 0 ? ' <first>' : ''));
+ if (DEBUG_MEMORY) MemoryDebugger.tick('func ' + func.ident);
}
+ func = null; // Do not hold on to anything from inside that loop (JS function scoping..)
// Actors