diff options
-rw-r--r-- | src/jsifier.js | 1 | ||||
-rw-r--r-- | src/library.js | 3 | ||||
-rw-r--r-- | src/shell_sharedlib.js | 2 |
3 files changed, 4 insertions, 2 deletions
diff --git a/src/jsifier.js b/src/jsifier.js index 0818f128..7e58d61d 100644 --- a/src/jsifier.js +++ b/src/jsifier.js @@ -1664,6 +1664,7 @@ function JSify(data, functionsOnly, givenFunctions) { print('STATIC_BASE = ' + Runtime.GLOBAL_BASE + ';\n'); print('STATICTOP = STATIC_BASE + ' + Runtime.alignMemory(Variables.nextIndexedOffset) + ';\n'); } else { + print('var H_BASE = parentModule["_malloc"](' + Runtime.alignMemory(Variables.nextIndexedOffset) + ');\n'); print('// STATICTOP = STATIC_BASE + ' + Runtime.alignMemory(Variables.nextIndexedOffset) + ';\n'); // comment as metadata only } } diff --git a/src/library.js b/src/library.js index b0035f21..3e244c67 100644 --- a/src/library.js +++ b/src/library.js @@ -5050,7 +5050,8 @@ LibraryManager.library = { try { var lib_module = eval(lib_data)( #if ASM_JS - asm.maxFunctionIndex + asm.maxFunctionIndex, + Module #else {{{ Functions.getTable('x') }}}.length #endif diff --git a/src/shell_sharedlib.js b/src/shell_sharedlib.js index 1d34c73e..505c3d7b 100644 --- a/src/shell_sharedlib.js +++ b/src/shell_sharedlib.js @@ -1,5 +1,5 @@ // Capture the output of this into a variable, if you want -(function(FUNCTION_TABLE_OFFSET, globalScope) { +(function(FUNCTION_TABLE_OFFSET, parentModule) { var Module = {}; var args = []; Module.arguments = []; |