Skip to content

Commit

Permalink
Disable InvokeDynamic on all J9 JVMs. See #477.
Browse files Browse the repository at this point in the history
  • Loading branch information
BanzaiMan committed Jan 5, 2013
1 parent cc90601 commit 9c84ba0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/org/jruby/util/cli/Options.java
Expand Up @@ -67,6 +67,7 @@ public static String dump() {
boolean isHotspot =
vmName.contains("hotspot") ||
vmName.toLowerCase().contains("openjdk");
boolean isJ9 = vmName.contains("J9");

String vmVersionString = SafePropertyAccessor.getProperty("java.vm.version", "");
String javaVersion = SafePropertyAccessor.getProperty("java.specification.version", "");
Expand All @@ -86,6 +87,9 @@ public static String dump() {
// Hotspot >= 24 will has the new working indy logic, so we enable by default
INVOKEDYNAMIC_DEFAULT = true;
}
} else if (isJ9) {
// https://github.com/jruby/jruby/issues/477 indicates that J9's Indy support may be lacking
INVOKEDYNAMIC_DEFAULT = false;
} else if (new BigDecimal(javaVersion).compareTo(new BigDecimal("1.7")) >= 0){
// if not on HotSpot, on if specification version supports indy
INVOKEDYNAMIC_DEFAULT = true;
Expand Down

0 comments on commit 9c84ba0

Please sign in to comment.