aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2011-12-07 16:04:55 -0800
committerAlon Zakai <alonzakai@gmail.com>2011-12-07 16:04:55 -0800
commitcda70ff4768b521f8f1d02483352fa997798324e (patch)
treec982bdcd5453c6fcda1207c510db45df998a4e4e /src
parent2101d2d569eb129798389d84eed20d41255e9319 (diff)
automatically disable SKIP_STACK_IN_SMALL when processing autodebugger data, to not flood the stack
Diffstat (limited to 'src')
-rw-r--r--src/intertyper.js6
-rw-r--r--src/settings.js3
2 files changed, 8 insertions, 1 deletions
diff --git a/src/intertyper.js b/src/intertyper.js
index 19eb658e..b16b1e3e 100644
--- a/src/intertyper.js
+++ b/src/intertyper.js
@@ -123,6 +123,12 @@ function intertyper(data, sidePass, baseLineNums) {
inFunction = false;
if (mainPass) {
var func = funcHeader.processItem(tokenizer.processItem({ lineText: currFunctionLines[0], lineNum: currFunctionLineNum }, true))[0];
+
+ if (SKIP_STACK_IN_SMALL && /emscripten_autodebug/.exec(func.ident)) {
+ warn('Disabling SKIP_STACK_IN_SMALL because we are apparently processing autodebugger data');
+ SKIP_STACK_IN_SMALL = 0;
+ }
+
unparsedBundles.push({
intertype: 'unparsedFunction',
// We need this early, to know basic function info - ident, params, varargs
diff --git a/src/settings.js b/src/settings.js
index 84b68b54..1e041508 100644
--- a/src/settings.js
+++ b/src/settings.js
@@ -85,7 +85,8 @@ var SKIP_STACK_IN_SMALL = 1; // When enabled, does not push/pop the stack at all
// may allocate stack later, and in a loop, this can be
// very bad. In particular, when debugging, printf()ing
// a lot can exhaust the stack very fast, with this option.
- // In particular, be careful with the autodebugger!
+ // In particular, be careful with the autodebugger! (We do turn
+ // this off automatically in that case, though.)
var INLINE_LIBRARY_FUNCS = 1; // Will inline library functions that have __inline defined
var CLOSURE_INLINE_PREVENTION_LINES = 50; // Functions of this number of lines or larger will have
// code generated that tells the closure compiler not to