diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-11-09 18:57:58 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-11-09 18:57:58 -0800 |
commit | e502997adaa4c84fae8bb33c4479492bb19e835f (patch) | |
tree | cd30635e53efb4980a61866c0af1445515b6eb90 | |
parent | e791bb3d82328642ef4d8f7e606a58c8895f8462 (diff) |
improve LABEL_DEBUG
-rw-r--r-- | src/jsifier.js | 4 | ||||
-rw-r--r-- | src/settings.js | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/jsifier.js b/src/jsifier.js index 9a3d6ae2..9c022efb 100644 --- a/src/jsifier.js +++ b/src/jsifier.js @@ -562,7 +562,7 @@ function JSify(data, functionsOnly, givenFunctions) { } }); - if (LABEL_DEBUG) func.JS += " Module.print(INDENT + ' Entering: " + func.ident + "'); INDENT += ' ';\n"; + if (LABEL_DEBUG) func.JS += " Module.print(INDENT + ' Entering: " + func.ident + ": ' + Array.prototype.slice.call(arguments)); INDENT += ' ';\n"; if (true) { // TODO: optimize away when not needed if (CLOSURE_ANNOTATIONS) func.JS += '/** @type {number} */'; @@ -576,7 +576,7 @@ function JSify(data, functionsOnly, givenFunctions) { function getLabelLines(label, indent, relooping) { if (!label) return ''; var ret = ''; - if (LABEL_DEBUG) { + if (LABEL_DEBUG >= 2) { ret += indent + "Module.print(INDENT + '" + func.ident + ":" + label.ident + "');\n"; } if (EXECUTION_TIMEOUT > 0) { diff --git a/src/settings.js b/src/settings.js index 24949e25..5d4299a4 100644 --- a/src/settings.js +++ b/src/settings.js @@ -126,7 +126,8 @@ var SAFE_HEAP = 0; // Check each write to the heap, for example, this will give // that 3 is the option you usually want here. var SAFE_HEAP_LOG = 0; // Log out all SAFE_HEAP operations -var LABEL_DEBUG = 0; // Print out labels and functions as we enter them +var LABEL_DEBUG = 0; // 1: Print out functions as we enter them + // 2: Also print out each label as we enter it var EXCEPTION_DEBUG = 1; // Print out exceptions in emscriptened code var LIBRARY_DEBUG = 0; // Print out when we enter a library call (library*.js). You can also unset |