aboutsummaryrefslogtreecommitdiff
path: root/tools/js-optimizer.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2011-12-06 13:27:43 -0800
committerAlon Zakai <alonzakai@gmail.com>2011-12-06 13:27:43 -0800
commitbea3d23dc5316222d31127299ea1896223075ac4 (patch)
treef7eaa5442d162cd3ca2575e6a46c06a0fd7a309c /tools/js-optimizer.js
parent0f3f5cc6934a45c78ce7bfb2bdab15bb8756edf7 (diff)
initial work on memory growth
Diffstat (limited to 'tools/js-optimizer.js')
-rw-r--r--tools/js-optimizer.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/js-optimizer.js b/tools/js-optimizer.js
index e889c7a3..d22de39c 100644
--- a/tools/js-optimizer.js
+++ b/tools/js-optimizer.js
@@ -193,6 +193,11 @@ function unGlobalize(ast) {
// - and in library/shell code too! - we should never rely on
// undefined being assigned. So we can simply remove those assignments.
//
+// Note: An inlined function that kept a large value referenced, may
+// keep that references when inlined, if we remove the setting to
+// undefined. This is not dangerous in compiled code, but might be
+// in supporting code (for example, holding on to the HEAP when copying).
+//
// This pass assumes that unGlobalize has been run, so undefined
// is now explicit.
function removeAssignsToUndefined(ast) {