diff options
author | Alon Zakai <alonzakai@gmail.com> | 2011-06-29 19:16:08 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2011-06-29 19:16:08 -0700 |
commit | 0e9344a42800afd65b3c74c86e79ed78c15161f0 (patch) | |
tree | 44dfad042648a02fed1fe76c002f677f5b70e497 /src/library.js | |
parent | 8fc2acdc4ec487130a98f26e3e8e2a70bd54de96 (diff) |
indexize external functions (for shared libraries, primarily), +some code cleanup around that. fixed issues 38
Diffstat (limited to 'src/library.js')
-rw-r--r-- | src/library.js | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/library.js b/src/library.js index 284f093d..685f839a 100644 --- a/src/library.js +++ b/src/library.js @@ -1476,7 +1476,17 @@ var Library = { // ========================================================================== - // dlfcn.h + // dlfcn.h - Dynamic library loading + // + // Some limitations: + // + // * Minification on each file separately may not work, as they will + // have different shortened names. You can in theory combine them, then + // minify, then split... perhaps. + // + // * LLVM optimizations may fail. If the child wants to access a function + // in the parent, LLVM opts may remove it from the parent when it is + // being compiled. Not sure how to tell LLVM to not do so. // ========================================================================== // Data for dlfcn.h. @@ -1510,6 +1520,9 @@ var Library = { try { var lib_module = eval(lib_data)(FUNCTION_TABLE.length); } catch (e) { +#if ASSERTIONS + print('Error in loading dynamic library: ' + e); +#endif DLFCN_DATA.isError = true; return 0; } |