diff options
author | max99x <max99x@gmail.com> | 2011-06-26 00:24:46 +0300 |
---|---|---|
committer | max99x <max99x@gmail.com> | 2011-06-26 00:24:46 +0300 |
commit | b7cd8aad767e9cb4b0555a60c489966df8dc9405 (patch) | |
tree | 4c4eec0c69e1ad03d83588d96f35d87bcedcdbf3 /src/modules.js | |
parent | 37a1ccacaa79addac6094983897d67e0a8630160 (diff) |
Fixed function indexing issues between parent and child;
Child no longer includes library, using the parent's instead.
Diffstat (limited to 'src/modules.js')
-rw-r--r-- | src/modules.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/modules.js b/src/modules.js index fd18fc72..91758609 100644 --- a/src/modules.js +++ b/src/modules.js @@ -140,7 +140,13 @@ var Functions = { // Generate code for function indexing generateIndexing: function() { - return 'var FUNCTION_TABLE = [' + this.indexedFunctions.toString().replace('"', '') + '];'; + var indices = this.indexedFunctions.toString().replace('"', ''); + if (BUILD_AS_SHARED_LIB) { + // Shared libraries reuse the parent's function table. + return 'FUNCTION_TABLE = FUNCTION_TABLE.concat([' + indices + ']);'; + } else { + return 'var FUNCTION_TABLE = [' + indices + '];'; + } } }; |