aboutsummaryrefslogtreecommitdiff
path: root/src/runtime.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime.js')
-rw-r--r--src/runtime.js44
1 files changed, 0 insertions, 44 deletions
diff --git a/src/runtime.js b/src/runtime.js
index ebf953ce..33088ad9 100644
--- a/src/runtime.js
+++ b/src/runtime.js
@@ -384,50 +384,6 @@ var Runtime = {
return Runtime.funcWrappers[func];
},
-#if DLOPEN_SUPPORT
- functionTable: [], // will contain objects mapping sigs to js functions that call into the right asm module with the right index
-
- registerFunctions: function(asm, num, sigs, jsModule) {
- // use asm module dynCall_* from functionTable
- if (num % 2 == 1) num++; // keep pointers even
- var table = Runtime.functionTable;
- var from = table.length;
- assert(from % 2 == 0);
- for (var i = 0; i < num; i++) {
- table[from + i] = {};
- sigs.forEach(function(sig) { // TODO: new Function etc.
- var full = 'dynCall_' + sig;
- table[from + i][sig] = function() {
- arguments[0] -= from;
- return asm[full].apply(null, arguments);
- }
- });
- }
-
- if (jsModule.cleanups) {
- var newLength = table.length;
- jsModule.cleanups.push(function() {
- if (table.length === newLength) {
- table.length = from; // nothing added since, just shrink
- } else {
- // something was added above us, clear and leak the span
- for (var i = 0; i < num; i++) {
- table[from + i] = null;
- }
- }
- while (table.length > 0 && table[table.length-1] === null) table.pop();
- });
- }
-
- // patch js module dynCall_* to use functionTable
- sigs.forEach(function(sig) {
- jsModule['dynCall_' + sig] = function() {
- return table[arguments[0]][sig].apply(null, arguments);
- };
- });
- },
-#endif
-
// Returns a processor of UTF.
// processCChar() receives characters from a C-like UTF representation and returns JS string fragments.
// See RFC3629 for details, the bytes are assumed to be valid UTF-8