aboutsummaryrefslogtreecommitdiff
path: root/src/runtime.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-01-06 17:55:44 -0800
committerAlon Zakai <alonzakai@gmail.com>2012-01-06 17:55:44 -0800
commit27adc83bb2454fc71149b3efdae93d9c323d3bac (patch)
tree70c993a70ca3fa7ef1fbd6a12d177cf772c09463 /src/runtime.js
parent638532d89fc586adc739eb535625971bd29c8a74 (diff)
prevent stack from being exhausted due to allocas and byval arguments
Diffstat (limited to 'src/runtime.js')
-rw-r--r--src/runtime.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/runtime.js b/src/runtime.js
index 76b01089..605de749 100644
--- a/src/runtime.js
+++ b/src/runtime.js
@@ -29,8 +29,8 @@ var RuntimeGenerator = {
return ret;
},
- stackEnter: function(initial) {
- if (initial === 0 && SKIP_STACK_IN_SMALL) return '';
+ stackEnter: function(initial, force) {
+ if (initial === 0 && SKIP_STACK_IN_SMALL && !force) return '';
if (USE_TYPED_ARRAYS === 2) initial = Runtime.forceAlign(initial);
var ret = 'var __stackBase__ = STACKTOP; STACKTOP += ' + initial;
if (ASSERTIONS) {
@@ -42,8 +42,8 @@ var RuntimeGenerator = {
return ret;
},
- stackExit: function(initial) {
- if (initial === 0 && SKIP_STACK_IN_SMALL) return '';
+ stackExit: function(initial, force) {
+ if (initial === 0 && SKIP_STACK_IN_SMALL && !force) return '';
var ret = '';
if (SAFE_HEAP) {
ret += 'for (var i = __stackBase__; i < STACKTOP; i++) SAFE_HEAP_CLEAR(i);';