aboutsummaryrefslogtreecommitdiff
path: root/tools/js-optimizer.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2011-12-10 17:26:15 -0800
committerAlon Zakai <alonzakai@gmail.com>2011-12-10 17:26:15 -0800
commitf59ffc338e2c1df792709a823be1c1d2735e88bf (patch)
tree7268bc264e4364f9766f1b137882870bf7b90569 /tools/js-optimizer.js
parent0162cc4bdc1955b442bec1a185d024d3d30cec0e (diff)
parent3a35fd9389a18707abd51dc71e2096c64413d510 (diff)
Merge branch 'ta2bydefault'
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) {