diff options
Diffstat (limited to 'src/runtime.js')
-rw-r--r-- | src/runtime.js | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/runtime.js b/src/runtime.js index 0b809d6b..c99d9d6f 100644 --- a/src/runtime.js +++ b/src/runtime.js @@ -30,10 +30,7 @@ RuntimeGenerator = { }, stackEnter: function(initial) { - if (initial === 0) return ''; // Note that we don't even push the stack! This is faster, but - // means that we don't clear stack allocations done in this function - // until the parent unwinds its stack. So potentially if we are in - // a loop, we can use a lot of memory. + if (initial === 0 && SKIP_STACK_IN_SMALL) return ''; var ret = 'var __stackBase__ = STACKTOP; STACKTOP += ' + initial; if (ASSERTIONS) { ret += '; assert(STACKTOP < STACK_MAX)'; @@ -45,7 +42,7 @@ RuntimeGenerator = { }, stackExit: function(initial) { - if (initial === 0) return ''; // See comment in stackEnter + if (initial === 0 && SKIP_STACK_IN_SMALL) return ''; var ret = ''; if (SAFE_HEAP) { ret += 'for (var i = __stackBase__; i < STACKTOP; i++) SAFE_HEAP_CLEAR(i);'; |