Static analysis of IfNode doesn't properly recognize terminating branches, resulting in unnecessary widening of some variables. E.g. Octane Crypto benchmark contains this code in its bnpFromString function: var k; if(b == 16) k = 4; else if(b == 8) k = 3; else if(b == 256) k = 8; // byte array else if(b == 2) k = 1; else if(b == 32) k = 5; else if(b == 4) k = 2; else { this.fromRadix(s,b); return; } ... Currently, the type of k will be OBJECT after the if/elseif statements. This is due to the fact that the analysis doesn't recognize that the only branch that doesn't set it to INT also terminates, therefore it is impossible to exit the last else branch with k being UNDEFINED.
|