aboutsummaryrefslogtreecommitdiff
path: root/src/jsifier.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/jsifier.js
parentade7864b5d424b961313773b4487c0798e0bebed (diff)
clear errors on calling dead functions
Diffstat (limited to 'src/jsifier.js')
-rw-r--r--src/jsifier.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/jsifier.js b/src/jsifier.js
index 9678a56d..6d8def39 100644
--- a/src/jsifier.js
+++ b/src/jsifier.js
@@ -1441,6 +1441,10 @@ function JSify(data, functionsOnly, givenFunctions) {
if (callIdent in DEAD_FUNCTIONS) {
var ret = 'abort(' + DEAD_FUNCTIONS[callIdent] + ')';
if (ASM_JS) ret = asmCoercion(ret, returnType);
+ if (ASSERTIONS) {
+ assert(DEFAULT_LIBRARY_FUNCS_TO_INCLUDE.indexOf('putchar') >= 0, 'need putchar for DEAD_FUNCTIONS + ASSERTIONS output');
+ ret = '(' + makePrintChars('dead:' + callIdent, ',') + ',' + ret + ')';
+ }
return ret;
}