aboutsummaryrefslogtreecommitdiff
path: root/src/library.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2011-06-30 18:30:50 -0700
committerAlon Zakai <alonzakai@gmail.com>2011-06-30 18:30:50 -0700
commit7d8e65edda5d330787c35a3d9f9aef3ba660d2c2 (patch)
tree4f01c7ab8de35a28bb2598cbc43a64c0acec4d81 /src/library.js
parenta326e6a1ec7c124dd4e74a38d3c8948b3ace92bc (diff)
refactoring+cleanup, to add type info where it was missing. allows proper function indexing by type, and not recognizing the identifier. fixes issue 38
Diffstat (limited to 'src/library.js')
-rw-r--r--src/library.js15
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;
}