diff options
author | Alon Zakai <alonzakai@gmail.com> | 2011-09-26 17:05:53 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2011-09-26 17:05:53 -0700 |
commit | 36adf9c4448b42c16880fe57e939ecc5e4d03188 (patch) | |
tree | f8427f652027bd29e6913a4b3c1dff89e3026224 /src | |
parent | 57c012482aed42154a0cad98c7b3a65363f4d276 (diff) |
expose some things to Module
Diffstat (limited to 'src')
-rw-r--r-- | src/modules.js | 2 | ||||
-rw-r--r-- | src/preamble.js | 3 |
2 files changed, 4 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; |