Review request for JDK-8058610

Marcus Lagergren marcus.lagergren at oracle.com
Tue Oct 21 11:31:15 UTC 2014


An example in this comment would have helped me understand this sooner. Maybe you can add one? It would be appreciated.
+                // Can reorder, but can't move conversion into the operand as the operation depends on operands
+                // exact types for its overflow guarantees.
Can these be private?

+    static Type booleanToInt(final Type t) {
+        return t == Type.BOOLEAN ? Type.INT : t;
+    }
+
+    static Type objectToNumber(final Type t) {
+        return t.isObject() ? Type.NUMBER : t;
+    }

Wasn’t it possible by solving this by always using an indy lmul(jj)j that might throw an UnwarrantedOptimismException containing a double, or is it too expensive to introduce the 53 bit check logic there? Are we using lmul(jj)j elsewhere and not checking this?

Otherwise +1

Regards
Marcus


On 21 Oct 2014, at 14:46, Attila Szegedi <attila.szegedi at oracle.com> wrote:

> Please review JDK-8058610 at <http://cr.openjdk.java.net/~attila/8058610/webrev.00> for <https://bugs.openjdk.java.net/browse/JDK-8058610>
> 
> Thanks,
>  Attila.



More information about the nashorn-dev mailing list