You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ ~/Downloads/graalvm-community-openjdk-17.0.8+7.1/Contents/Home/bin/java --version
openjdk 17.0.8 2023-07-18
OpenJDK Runtime Environment GraalVM CE 17.0.8+7.1 (build 17.0.8+7-jvmci-23.0-b15)
OpenJDK 64-Bit Server VM GraalVM CE 17.0.8+7.1 (build 17.0.8+7-jvmci-23.0-b15, mixed mode, sharing)
The text was updated successfully, but these errors were encountered:
kharvd
changed the title
Number.isInteger is false for a Long passed from Java
Number.isInteger is incorrectly false for a Long passed from Java
Oct 11, 2023
kharvd
changed the title
Number.isInteger is incorrectly false for a Long passed from Java
Number.isInteger is incorrectly false for a java.lang.Long
Oct 11, 2023
No, it is not expected that isInteger()/isFinite() return false for long. It is a bug. It is an unfortunate/unexpected consequence of the changeset that you have mentioned i.e. of the fact that JSRuntime.isNumber() does not return true for long anymore.
I assume that the change in JSRuntime.isNumber() is intentional i.e. that this method should return true just for arguments that represent a numeric value that can be converted to JavaScript Number (i.e. to double) without the loss of the precision. This is not the case for long. Unfortunately, the specializations for some nodes were not updated to match this change.
Actual result:
Expected result:
Version:
$ ~/Downloads/graalvm-community-openjdk-17.0.8+7.1/Contents/Home/bin/java --version openjdk 17.0.8 2023-07-18 OpenJDK Runtime Environment GraalVM CE 17.0.8+7.1 (build 17.0.8+7-jvmci-23.0-b15) OpenJDK 64-Bit Server VM GraalVM CE 17.0.8+7.1 (build 17.0.8+7-jvmci-23.0-b15, mixed mode, sharing)
The text was updated successfully, but these errors were encountered: