aboutsummaryrefslogtreecommitdiff
path: root/src/compiler.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-04-23 10:54:59 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-04-23 10:54:59 -0700
commit23ed21d54e73db3597b64b6b06ab09194717c1c4 (patch)
tree337d4579d80cc9dba5486de97804944f283c5193 /src/compiler.js
parentade7864b5d424b961313773b4487c0798e0bebed (diff)
clear errors on calling dead functions
Diffstat (limited to 'src/compiler.js')
-rw-r--r--src/compiler.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/compiler.js b/src/compiler.js
index 9c19aeb0..d74ff7cb 100644
--- a/src/compiler.js
+++ b/src/compiler.js
@@ -168,6 +168,8 @@ if (SAFE_HEAP >= 2) {
EXPORTED_FUNCTIONS = set(EXPORTED_FUNCTIONS);
EXPORTED_GLOBALS = set(EXPORTED_GLOBALS);
EXCEPTION_CATCHING_WHITELIST = set(EXCEPTION_CATCHING_WHITELIST);
+
+if (DEAD_FUNCTIONS.length && ASSERTIONS) DEFAULT_LIBRARY_FUNCS_TO_INCLUDE.push('putchar'); // for debug output
DEAD_FUNCTIONS = numberedSet(DEAD_FUNCTIONS);
RUNTIME_DEBUG = LIBRARY_DEBUG || GL_DEBUG;