Review request for JDK-8066225

Hannes Wallnoefer hannes.wallnoefer at
Wed Dec 10 11:06:43 UTC 2014


Am 2014-12-08 um 15:22 schrieb Attila Szegedi:
> Please review JDK-8066225 at <> for <>
> I changed SwitchNode.isInteger() method to SwitchNode.isUniqueInteger() (it returns true if all cases are 32-bit integer constants, *and* there are no repetitions among them). Duplicates will have us switch to if/else compilation instead of tableswith/lookupswitch.
> Also, instead of having this method's return value being calculated on every invocation (it is invoked at least 4 times; potentially more in LocalVariableTypesCalculator if it's in a loop), I moved the calculation to only happen once, in FoldConstants (after the case node expressions have been constant-folded) and subsequently storing it in a boolean field.
> Thanks,
>    Attila.

More information about the nashorn-dev mailing list