diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-04-24 09:14:54 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-04-24 09:14:54 -0700 |
commit | 087231e369f5fc44b26be5db1b86af378a67028d (patch) | |
tree | fa782c1bd852cdb6bc267b71149a024ca1b6078c /src/compiler.js | |
parent | 9971952dd5199c0b202397ae7d45d7c686c477ef (diff) |
auto-generate library stubs that abort for missing library functions, and implement DEAD_FUNCTIONS that way
Diffstat (limited to 'src/compiler.js')
-rw-r--r-- | src/compiler.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/compiler.js b/src/compiler.js index d74ff7cb..313fd5f7 100644 --- a/src/compiler.js +++ b/src/compiler.js @@ -169,7 +169,9 @@ 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.forEach(function(dead) { + DEFAULT_LIBRARY_FUNCS_TO_INCLUDE.push(dead.substr(1)); +}); DEAD_FUNCTIONS = numberedSet(DEAD_FUNCTIONS); RUNTIME_DEBUG = LIBRARY_DEBUG || GL_DEBUG; |