diff options
author | Alon Zakai <alonzakai@gmail.com> | 2014-06-11 13:43:19 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2014-06-11 13:48:13 -0700 |
commit | bd5acc202250c11ac85a7b8bb7eae0540634c061 (patch) | |
tree | bdf39ba605a0be5b05bb25408eb52e6a0f68e8b7 | |
parent | e44b9d6a9ea7fec734624ad21acd97bfc13aaaf8 (diff) |
LIBRARY_DEBUG fix
-rw-r--r-- | src/jsifier.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/jsifier.js b/src/jsifier.js index a7a53803..d1001dac 100644 --- a/src/jsifier.js +++ b/src/jsifier.js @@ -370,7 +370,7 @@ function JSify(data, functionsOnly) { // name the function; overwrite if it's already named snippet = snippet.replace(/function(?:\s+([^(]+))?\s*\(/, 'function _' + ident + '('); - if (LIBRARY_DEBUG) { + if (LIBRARY_DEBUG && !LibraryManager.library[ident + '__asm']) { snippet = snippet.replace('{', '{ var ret = (function() { if (Runtime.debug) Module.printErr("[library call:' + ident + ': " + Array.prototype.slice.call(arguments).map(Runtime.prettyPrint) + "]"); '); snippet = snippet.substr(0, snippet.length-1) + '}).apply(this, arguments); if (Runtime.debug && typeof ret !== "undefined") Module.printErr(" [ return:" + Runtime.prettyPrint(ret)); return ret; \n}'; } |