Comment #4 on issue 1631 by max99x: Stack size limit too low
http://code.google.com/p/v8/issues/detail?id=1631

You can pull the dist/ folder from this repo: https://github.com/max99x/empythoned/tree/master

I've since wrote a script to preprocess the JS and eliminate redundant variables (https://github.com/max99x/emscripten/blob/master/tools/eliminator/eliminator.coffee), but this still applies in the general case.

The problem is that Emscripten generates atypical code that looks roughly like this:

function foo($0) {
  var $1=HEAP[$0];
  var $2=$1+$2;
  var $3=bar($2);
  var $4=($3);
  var $5=$4 + 2;
  var $6=$5 * 3;
  var $7=quux($6);
  return $7;
}

...but with 10K variables in some extreme cases. Most of the variables are single-use so there's no reason to store them in the stack frame.

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to