diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-01-19 20:54:25 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-01-19 20:54:25 -0800 |
commit | 43d12039520906463e605c3e07f0a7330fcf3be1 (patch) | |
tree | 278902baeae29c420d9be93733daafbb7e5d83bc | |
parent | a532ce2fc8d8ba798c94d7dc6425172e3f4574e8 (diff) |
fix LIBRARY_DEBUG for asm
-rw-r--r-- | src/jsifier.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/jsifier.js b/src/jsifier.js index 08b6d4f6..58c050aa 100644 --- a/src/jsifier.js +++ b/src/jsifier.js @@ -440,8 +440,8 @@ function JSify(data, functionsOnly, givenFunctions) { // name the function; overwrite if it's already named snippet = snippet.replace(/function(?:\s+([^(]+))?\s*\(/, 'function _' + ident + '('); if (LIBRARY_DEBUG) { - snippet = snippet.replace('{', '{ var ret = (function() { if (Runtime.debug) Module.print("[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.print(" [ return:" + Runtime.prettyPrint(ret)); return ret; }'; + 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}'; } if (ASM_JS) Functions.libraryFunctions[ident] = 1; } |