It seems like adding braces here actual makes the final output smaller:
emscripten_console_log: (str) => { console.log(UTF8ToString(str)) }
Compared to:
emscripten_console_log: (str) => console.log(UTF8ToString(str))
It seems to happen when closure inlines UTF8ToString into emscripten_console_log. In the former case I supposed closure knows that the function returns undefined, but in the later case it adds an extra return keyword to return the result of the console.log call.
Maybe there is some way to teach closure that console.log always returns undefined so this is not needed?
It seems like adding braces here actual makes the final output smaller:
Compared to:
It seems to happen when closure inlines
UTF8ToStringintoemscripten_console_log. In the former case I supposed closure knows that the function returns undefined, but in the later case it adds an extrareturnkeyword to return the result of theconsole.logcall.Maybe there is some way to teach closure that
console.logalways returns undefined so this is not needed?