aboutsummaryrefslogtreecommitdiff
path: root/src/jsifier.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-03-18 13:42:32 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-03-18 13:42:32 -0700
commit5685df86fd3a64f5b0e4acfbebab39559b96455d (patch)
tree721e8c480a7a6c29830eea9e5000236996a864e8 /src/jsifier.js
parentcc35ae70ece1f93a23bd666bda395fbb697bbda8 (diff)
add option to turn all unresolved references into dead functions (i.e., no compile-time warnings or errors, instead runtime aborts
Diffstat (limited to 'src/jsifier.js')
-rw-r--r--src/jsifier.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/jsifier.js b/src/jsifier.js
index 5c718c09..7db2ee70 100644
--- a/src/jsifier.js
+++ b/src/jsifier.js
@@ -512,7 +512,7 @@ function JSify(data, functionsOnly, givenFunctions) {
} else if (LibraryManager.library.hasOwnProperty(shortident)) {
item.JS = addFromLibrary(shortident);
} else if (!LibraryManager.library.hasOwnProperty(shortident + '__inline')) {
- if (!(item.ident in DEAD_FUNCTIONS)) {
+ if (!(item.ident in DEAD_FUNCTIONS) && !UNRESOLVED_AS_DEAD) {
item.JS = 'var ' + item.ident + '; // stub for ' + item.ident;
if (ASM_JS) {
throw 'Unresolved symbol: ' + item.ident + ', this must be corrected for asm.js validation to succeed. Consider adding it to DEAD_FUNCTIONS.';