diff options
Diffstat (limited to 'src/runtime.js')
-rw-r--r-- | src/runtime.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/runtime.js b/src/runtime.js index e902d27b..dc604a8d 100644 --- a/src/runtime.js +++ b/src/runtime.js @@ -25,7 +25,7 @@ var RuntimeGenerator = { sep = sep || ';'; if (USE_TYPED_ARRAYS === 2) 'STACKTOP = (STACKTOP + STACKTOP|0 % ' + ({{{ QUANTUM_SIZE }}} - (isNumber(size) ? Math.min(size, {{{ QUANTUM_SIZE }}}) : {{{ QUANTUM_SIZE }}})) + ')' + sep; // The stack is always QUANTUM SIZE aligned, so we may not need to force alignment here - var ret = RuntimeGenerator.alloc(size, 'STACK', INIT_STACK, sep, USE_TYPED_ARRAYS != 2 || (isNumber(size) && parseInt(size) % {{{ QUANTUM_SIZE }}} == 0)); + var ret = RuntimeGenerator.alloc(size, 'STACK', false, sep, USE_TYPED_ARRAYS != 2 || (isNumber(size) && parseInt(size) % {{{ QUANTUM_SIZE }}} == 0)); if (ASSERTIONS) { ret += sep + 'assert(STACKTOP|0 < STACK_MAX|0)'; } @@ -45,7 +45,7 @@ var RuntimeGenerator = { if (ASSERTIONS) { ret += '; assert(STACKTOP < STACK_MAX)'; } - if (INIT_STACK) { + if (false) { ret += '; _memset(' + asmCoercion('__stackBase__', 'i32') + ', 0, ' + initial + ')'; } return ret; @@ -365,6 +365,11 @@ var Runtime = { return ret; }, + removeFunction: function(index) { + var table = FUNCTION_TABLE; // TODO: support asm + table[index] = null; + }, + warnOnce: function(text) { if (!Runtime.warnOnce.shown) Runtime.warnOnce.shown = {}; if (!Runtime.warnOnce.shown[text]) { |