Nim is a compiled, garbage-collected systems programming language with a design that focuses on efficiency, expressiveness, and elegance (in that order of priority).
it should be eliminated by dead code elimination but isn't:
Example
in the simplest program(eg: discard) js output is:
/* Generated by the Nim Compiler v1.5.1 */
var framePtr = null;
var excHandler = 0;
var lastJSError = null;
if (!Math.trunc) {
Math.trunc = function(v) {
v = +v;
if (!isFinite(v)) return v;
return (v - v % 1) || (v < 0 ? -0 : v === 0 ? v : 0);
};
}
it should be eliminated by dead code elimination but isn't:
Example
in the simplest program(eg:
discard
) js output is:Additional Information
1.5.1 d2f4f25b5660454c2483ab1249195b3a3d037588