aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/modules.js2
-rw-r--r--src/preamble.js3
-rw-r--r--tests/runner.py1
3 files changed, 5 insertions, 1 deletions
diff --git a/src/modules.js b/src/modules.js
index a4a64790..942f58ba 100644
--- a/src/modules.js
+++ b/src/modules.js
@@ -244,7 +244,7 @@ var Functions = {
// Shared libraries reuse the parent's function table.
return 'FUNCTION_TABLE = FUNCTION_TABLE.concat([' + indices + ']);';
} else {
- return 'FUNCTION_TABLE = [' + indices + '];';
+ return 'FUNCTION_TABLE = [' + indices + ']; Module["FUNCTION_TABLE"] = FUNCTION_TABLE;';
}
}
};
diff --git a/src/preamble.js b/src/preamble.js
index 1c1ec915..c59a50d1 100644
--- a/src/preamble.js
+++ b/src/preamble.js
@@ -430,6 +430,9 @@ Module['getValue'] = getValue;
var ALLOC_NORMAL = 0; // Tries to use _malloc()
var ALLOC_STACK = 1; // Lives for the duration of the current function call
var ALLOC_STATIC = 2; // Cannot be freed
+Module['ALLOC_NORMAL'] = ALLOC_NORMAL;
+Module['ALLOC_STACK'] = ALLOC_STACK;
+Module['ALLOC_STATIC'] = ALLOC_STATIC;
function allocate(slab, types, allocator) {
var zeroinit, size;
diff --git a/tests/runner.py b/tests/runner.py
index 2c0b3e72..b82cef80 100644
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -3148,6 +3148,7 @@ if 'benchmark' not in str(sys.argv):
global SAFE_HEAP; SAFE_HEAP = 0 # uses time.h to set random bytes, other stuff
global DISABLE_EXCEPTION_CATCHING; DISABLE_EXCEPTION_CATCHING = 1
global FAST_MEMORY; FAST_MEMORY = 4*1024*1024
+ global EXPORTED_FUNCTIONS; EXPORTED_FUNCTIONS = ['_main', '_sqlite3_open', '_sqlite3_close', '_sqlite3_exec', '_sqlite3_free', '_callback'];
global INVOKE_RUN; INVOKE_RUN = 0 # We append code that does run() ourselves