--- old/.mx.jvmci/.pydevproject 2017-04-20 21:50:00.000000000 +0200 +++ new/.mx.jvmci/.pydevproject 2017-04-20 21:50:00.000000000 +0200 @@ -3,7 +3,7 @@ Default python 2.7 -/.mx.jvmci +/mx.jvmci /mx --- old/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCICompilerConfig.java 2017-04-20 21:50:01.000000000 +0200 +++ new/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCICompilerConfig.java 2017-04-20 21:50:01.000000000 +0200 @@ -28,9 +28,9 @@ import jdk.vm.ci.runtime.JVMCICompiler; import jdk.vm.ci.runtime.JVMCICompilerFactory; import jdk.vm.ci.runtime.JVMCIRuntime; -import jdk.vm.ci.services.JVMCIServiceLocator; import jdk.vm.ci.services.JVMCIPermission; -import jdk.vm.ci.services.Services; +import jdk.vm.ci.services.JVMCIServiceLocator; +import jdk.vm.ci.services.internal.ReflectionAccessJDK; final class HotSpotJVMCICompilerConfig { @@ -47,7 +47,7 @@ @Override public String getCompilerName() { - return ""; + return "null"; } @Override @@ -73,19 +73,23 @@ JVMCICompilerFactory factory = null; String compilerName = Option.Compiler.getString(); if (compilerName != null) { - for (JVMCICompilerFactory f : JVMCIServiceLocator.getProviders(JVMCICompilerFactory.class)) { - if (f.getCompilerName().equals(compilerName)) { - factory = f; + if (compilerName.isEmpty() || compilerName.equals("null")) { + factory = new DummyCompilerFactory(); + } else { + for (JVMCICompilerFactory f : JVMCIServiceLocator.getProviders(JVMCICompilerFactory.class)) { + if (f.getCompilerName().equals(compilerName)) { + factory = f; + } + } + if (factory == null) { + throw new JVMCIError("JVMCI compiler '%s' not found", compilerName); } - } - if (factory == null) { - throw new JVMCIError("JVMCI compiler '%s' not found", compilerName); } } else { // Auto select a single available compiler for (JVMCICompilerFactory f : JVMCIServiceLocator.getProviders(JVMCICompilerFactory.class)) { if (factory == null) { - Services.exportJVMCITo(f.getClass()); + ReflectionAccessJDK.openJVMCITo(f.getClass()); factory = f; } else { // Multiple factories seen - cancel auto selection --- old/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIRuntime.java 2017-04-20 21:50:01.000000000 +0200 +++ new/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIRuntime.java 2017-04-20 21:50:01.000000000 +0200 @@ -32,6 +32,7 @@ import java.util.List; import java.util.Map; import java.util.Objects; +import java.util.ServiceLoader; import java.util.TreeMap; import jdk.internal.misc.VM; @@ -50,7 +51,6 @@ import jdk.vm.ci.runtime.JVMCICompiler; import jdk.vm.ci.runtime.JVMCICompilerFactory; import jdk.vm.ci.services.JVMCIServiceLocator; -import jdk.vm.ci.services.Services; /** * HotSpot implementation of a JVMCI runtime. @@ -88,7 +88,10 @@ */ public enum Option { // @formatter:off - Compiler(String.class, null, "Selects the system compiler."), + Compiler(String.class, null, "Selects the system compiler. This must match the getCompilerName() value returned " + + "by a jdk.vm.ci.runtime.JVMCICompilerFactory provider. " + + "An empty string or the value \"null\" selects a compiler " + + "that will raise an exception upon receiving a compilation request."), // Note: The following one is not used (see InitTimer.ENABLED). It is added here // so that -XX:+JVMCIPrintProperties shows the option. InitTimer(Boolean.class, false, "Specifies if initialization timing is enabled."), @@ -208,7 +211,7 @@ } public static HotSpotJVMCIBackendFactory findFactory(String architecture) { - for (HotSpotJVMCIBackendFactory factory : Services.load(HotSpotJVMCIBackendFactory.class)) { + for (HotSpotJVMCIBackendFactory factory : ServiceLoader.load(HotSpotJVMCIBackendFactory.class, ClassLoader.getSystemClassLoader())) { if (factory.getArchitecture().equalsIgnoreCase(architecture)) { return factory; } --- old/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMemoryAccessProviderImpl.java 2017-04-20 21:50:02.000000000 +0200 +++ new/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMemoryAccessProviderImpl.java 2017-04-20 21:50:02.000000000 +0200 @@ -98,7 +98,7 @@ boolean aligned = ((displacement - headerSize) % sizeOfElement) == 0; if (displacement < 0 || displacement > (arrayEnd - sizeOfElement) || (kind == JavaKind.Object && !aligned)) { int index = (int) ((displacement - headerSize) / sizeOfElement); - throw new AssertionError("Unsafe array access: reading element of kind " + kind + + throw new IllegalArgumentException("Unsafe array access: reading element of kind " + kind + " at offset " + displacement + " (index ~ " + index + ") in " + type.toJavaName() + " object of length " + length); } --- old/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedObjectTypeImpl.java 2017-04-20 21:50:03.000000000 +0200 +++ new/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedObjectTypeImpl.java 2017-04-20 21:50:03.000000000 +0200 @@ -801,8 +801,7 @@ } if (elementType.getName().startsWith("Ljava/")) { // Classes in a java.* package can only be defined by the - // boot class loader. This is enforced by ClassLoader.preDefineClass() - assert mirror().getClassLoader() == null; + // boot or platform class loader. return true; } ClassLoader thisCl = mirror().getClassLoader(); --- old/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.services/src/jdk/vm/ci/services/JVMCIServiceLocator.java 2017-04-20 21:50:03.000000000 +0200 +++ new/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.services/src/jdk/vm/ci/services/JVMCIServiceLocator.java 2017-04-20 21:50:03.000000000 +0200 @@ -24,12 +24,15 @@ import java.util.ArrayList; import java.util.List; +import java.util.ServiceLoader; + +import jdk.vm.ci.services.internal.ReflectionAccessJDK; /** * Service-provider class for the runtime to locate providers of JVMCI services where the latter are - * not in packages exported by the JVMCI module. As part of instantiating - * {@link JVMCIServiceLocator}, all JVMCI packages will be {@linkplain Services#exportJVMCITo(Class) - * exported} to the module defining the class of the instantiated object. + * not in packages exported by the JVMCI module. As part of instantiating a + * {@link JVMCIServiceLocator}, all JVMCI packages will be opened to the module defining the class + * of the instantiated object. * * While the {@link #getProvider(Class)} method can be used directly, it's usually easier to use * {@link #getProviders(Class)}. @@ -49,30 +52,37 @@ } /** - * Creates a capability for accessing JVMCI. Once successfully instantiated, JVMCI exports all - * its packages to the module defining the type of this object. + * Creates a capability for accessing JVMCI. Once successfully instantiated, JVMCI opens all its + * packages to the module defining the type of this object. * * @throws SecurityException if a security manager has been installed and it denies * {@link JVMCIPermission} */ protected JVMCIServiceLocator() { this(checkPermission()); - Services.exportJVMCITo(getClass()); + ReflectionAccessJDK.openJVMCITo(getClass()); } /** * Gets the provider of the service defined by {@code service} or {@code null} if this object * does not have a provider for {@code service}. */ - public abstract S getProvider(Class service); + protected abstract S getProvider(Class service); /** - * Gets the providers of the service defined by {@code service} by querying the - * {@link JVMCIServiceLocator} providers obtained by {@link Services#load(Class)}. + * Gets the providers of the service defined by {@code service} by querying the available + * {@link JVMCIServiceLocator} providers. + * + * @throws SecurityException if a security manager is present and it denies + * {@link JVMCIPermission} */ public static List getProviders(Class service) { + SecurityManager sm = System.getSecurityManager(); + if (sm != null) { + sm.checkPermission(new JVMCIPermission()); + } List providers = new ArrayList<>(); - for (JVMCIServiceLocator access : Services.load(JVMCIServiceLocator.class)) { + for (JVMCIServiceLocator access : ServiceLoader.load(JVMCIServiceLocator.class, ClassLoader.getSystemClassLoader())) { S provider = access.getProvider(service); if (provider != null) { providers.add(provider); --- old/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.services/src/jdk/vm/ci/services/Services.java 2017-04-20 21:50:04.000000000 +0200 +++ new/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.services/src/jdk/vm/ci/services/Services.java 2017-04-20 21:50:04.000000000 +0200 @@ -26,18 +26,52 @@ import java.lang.reflect.Method; import java.util.Formatter; import java.util.Iterator; +import java.util.Map; import java.util.ServiceConfigurationError; import java.util.ServiceLoader; import java.util.Set; /** - * A mechanism for accessing service providers via JVMCI. + * Provides utilities needed by JVMCI clients. + * + * This class must be compilable on JDK 8 and so use of API added in JDK 9 is made via reflection. */ public final class Services { private Services() { } + /** + * Gets an unmodifiable copy of the system properties saved when {@link System} is initialized. + */ + @SuppressWarnings("unchecked") + public static Map getSavedProperties() { + SecurityManager sm = System.getSecurityManager(); + if (sm != null) { + sm.checkPermission(new JVMCIPermission()); + } + try { + Class vmClass = Class.forName("jdk.internal.misc.VM"); + Method m = vmClass.getMethod("getSavedProperties"); + return (Map) m.invoke(null); + } catch (Exception e) { + throw new InternalError(e); + } + } + + /** + * Causes the JVMCI subsystem to be initialized if it isn't already initialized. + */ + public static void initializeJVMCI() { + try { + Class.forName("jdk.vm.ci.runtime.JVMCI"); + } catch (ClassNotFoundException e) { + throw new InternalError(e); + } + } + + // EVERYTHING BELOW HERE TO BE REMOVED AFTER NECESSARY GRAAL UPDATE + private static int getJavaSpecificationVersion() { String value = System.getProperty("java.specification.version"); if (value.startsWith("1.")) { @@ -185,4 +219,5 @@ } return singleProvider; } + } --- old/src/jdk.internal.vm.ci/share/classes/module-info.java 2017-04-20 21:50:05.000000000 +0200 +++ new/src/jdk.internal.vm.ci/share/classes/module-info.java 2017-04-20 21:50:05.000000000 +0200 @@ -24,7 +24,7 @@ */ module jdk.internal.vm.ci { - exports jdk.vm.ci.services to jdk.internal.vm.compiler; + exports jdk.vm.ci.services; uses jdk.vm.ci.services.JVMCIServiceLocator; uses jdk.vm.ci.hotspot.HotSpotJVMCIBackendFactory; --- old/test/compiler/jvmci/JVM_GetJVMCIRuntimeTest.java 2017-04-20 21:50:06.000000000 +0200 +++ new/test/compiler/jvmci/JVM_GetJVMCIRuntimeTest.java 2017-04-20 21:50:06.000000000 +0200 @@ -30,7 +30,7 @@ * @modules jdk.internal.vm.ci/jdk.vm.ci.runtime * @run main/othervm -XX:+UnlockExperimentalVMOptions * -Dcompiler.jvmci.JVM_GetJVMCIRuntimeTest.positive=true - * -XX:+EnableJVMCI + * -XX:+EnableJVMCI -Djvmci.Compiler=null * compiler.jvmci.JVM_GetJVMCIRuntimeTest * @run main/othervm -XX:+UnlockExperimentalVMOptions * -Dcompiler.jvmci.JVM_GetJVMCIRuntimeTest.positive=false @@ -39,7 +39,7 @@ * @run main/othervm -XX:+UnlockExperimentalVMOptions * -Dcompiler.jvmci.JVM_GetJVMCIRuntimeTest.positive=true * -Dcompiler.jvmci.JVM_GetJVMCIRuntimeTest.threaded=true - * -XX:+EnableJVMCI + * -XX:+EnableJVMCI -Djvmci.Compiler=null * compiler.jvmci.JVM_GetJVMCIRuntimeTest * @run main/othervm -XX:+UnlockExperimentalVMOptions * -Dcompiler.jvmci.JVM_GetJVMCIRuntimeTest.positive=false --- old/test/compiler/jvmci/TestJVMCIPrintProperties.java 2017-04-20 21:50:07.000000000 +0200 +++ new/test/compiler/jvmci/TestJVMCIPrintProperties.java 2017-04-20 21:50:06.000000000 +0200 @@ -36,11 +36,11 @@ public static void main(String[] args) throws Exception { ProcessBuilder pb = ProcessTools.createJavaProcessBuilder( "-XX:+UnlockExperimentalVMOptions", - "-XX:+EnableJVMCI", + "-XX:+EnableJVMCI", "-Djvmci.Compiler=null", "-XX:+JVMCIPrintProperties"); OutputAnalyzer output = new OutputAnalyzer(pb.start()); output.shouldContain("[JVMCI properties]"); // expected message - output.shouldContain("jvmci.Compiler = null"); // expected message + output.shouldContain("jvmci.Compiler := \"null\""); // expected message output.shouldContain("jvmci.InitTimer = false"); // expected message output.shouldContain("jvmci.PrintConfig = false"); // expected message output.shouldContain("jvmci.TraceMethodDataFilter = null"); // expected message --- old/test/compiler/jvmci/compilerToVM/AsResolvedJavaMethodTest.java 2017-04-20 21:50:08.000000000 +0200 +++ new/test/compiler/jvmci/compilerToVM/AsResolvedJavaMethodTest.java 2017-04-20 21:50:07.000000000 +0200 @@ -34,7 +34,7 @@ * jdk.internal.vm.ci/jdk.vm.ci.code * jdk.internal.vm.ci/jdk.vm.ci.meta * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper - * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.AsResolvedJavaMethodTest */ --- old/test/compiler/jvmci/compilerToVM/DoNotInlineOrCompileTest.java 2017-04-20 21:50:08.000000000 +0200 +++ new/test/compiler/jvmci/compilerToVM/DoNotInlineOrCompileTest.java 2017-04-20 21:50:08.000000000 +0200 @@ -39,6 +39,7 @@ * @run main/othervm -Xbootclasspath/a:. * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI * -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.DoNotInlineOrCompileTest */ --- old/test/compiler/jvmci/compilerToVM/FindUniqueConcreteMethodTest.java 2017-04-20 21:50:09.000000000 +0200 +++ new/test/compiler/jvmci/compilerToVM/FindUniqueConcreteMethodTest.java 2017-04-20 21:50:09.000000000 +0200 @@ -36,6 +36,7 @@ * jdk.internal.vm.ci/jdk.vm.ci.runtime * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.FindUniqueConcreteMethodTest */ --- old/test/compiler/jvmci/compilerToVM/GetBytecodeTest.java 2017-04-20 21:50:10.000000000 +0200 +++ new/test/compiler/jvmci/compilerToVM/GetBytecodeTest.java 2017-04-20 21:50:09.000000000 +0200 @@ -34,6 +34,7 @@ * jdk.internal.vm.ci/jdk.vm.ci.code * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.GetBytecodeTest */ --- old/test/compiler/jvmci/compilerToVM/GetClassInitializerTest.java 2017-04-20 21:50:10.000000000 +0200 +++ new/test/compiler/jvmci/compilerToVM/GetClassInitializerTest.java 2017-04-20 21:50:10.000000000 +0200 @@ -31,6 +31,7 @@ * @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.GetClassInitializerTest */ --- old/test/compiler/jvmci/compilerToVM/GetConstantPoolTest.java 2017-04-20 21:50:11.000000000 +0200 +++ new/test/compiler/jvmci/compilerToVM/GetConstantPoolTest.java 2017-04-20 21:50:11.000000000 +0200 @@ -38,6 +38,7 @@ * @run main/othervm -Xbootclasspath/a:. * -XX:+UnlockDiagnosticVMOptions * -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.GetConstantPoolTest */ package compiler.jvmci.compilerToVM; --- old/test/compiler/jvmci/compilerToVM/GetExceptionTableTest.java 2017-04-20 21:50:12.000000000 +0200 +++ new/test/compiler/jvmci/compilerToVM/GetExceptionTableTest.java 2017-04-20 21:50:11.000000000 +0200 @@ -34,6 +34,7 @@ * jdk.internal.vm.ci/jdk.vm.ci.code * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.GetExceptionTableTest */ @@ -137,4 +138,3 @@ } } } - --- old/test/compiler/jvmci/compilerToVM/GetImplementorTest.java 2017-04-20 21:50:12.000000000 +0200 +++ new/test/compiler/jvmci/compilerToVM/GetImplementorTest.java 2017-04-20 21:50:12.000000000 +0200 @@ -31,6 +31,7 @@ * @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.GetImplementorTest */ --- old/test/compiler/jvmci/compilerToVM/GetLineNumberTableTest.java 2017-04-20 21:50:13.000000000 +0200 +++ new/test/compiler/jvmci/compilerToVM/GetLineNumberTableTest.java 2017-04-20 21:50:13.000000000 +0200 @@ -35,6 +35,7 @@ * jdk.internal.vm.ci/jdk.vm.ci.code * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.GetLineNumberTableTest */ --- old/test/compiler/jvmci/compilerToVM/GetLocalVariableTableTest.java 2017-04-20 21:50:14.000000000 +0200 +++ new/test/compiler/jvmci/compilerToVM/GetLocalVariableTableTest.java 2017-04-20 21:50:14.000000000 +0200 @@ -38,6 +38,7 @@ * @compile -g DummyClass.java * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.GetLocalVariableTableTest * @clean compiler.jvmci.compilerToVM.* */ --- old/test/compiler/jvmci/compilerToVM/GetNextStackFrameTest.java 2017-04-20 21:50:14.000000000 +0200 +++ new/test/compiler/jvmci/compilerToVM/GetNextStackFrameTest.java 2017-04-20 21:50:14.000000000 +0200 @@ -35,6 +35,7 @@ * jdk.internal.vm.ci/jdk.vm.ci.meta * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.GetNextStackFrameTest */ --- old/test/compiler/jvmci/compilerToVM/GetResolvedJavaMethodTest.java 2017-04-20 21:50:15.000000000 +0200 +++ new/test/compiler/jvmci/compilerToVM/GetResolvedJavaMethodTest.java 2017-04-20 21:50:15.000000000 +0200 @@ -38,6 +38,7 @@ * @run main/othervm -Xbootclasspath/a:. * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI * -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.GetResolvedJavaMethodTest */ --- old/test/compiler/jvmci/compilerToVM/GetResolvedJavaTypeTest.java 2017-04-20 21:50:16.000000000 +0200 +++ new/test/compiler/jvmci/compilerToVM/GetResolvedJavaTypeTest.java 2017-04-20 21:50:16.000000000 +0200 @@ -44,7 +44,7 @@ * @run main/othervm -Xbootclasspath/a:. * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI * -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI - * -XX:-UseCompressedOops + * -XX:-UseCompressedOops -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.GetResolvedJavaTypeTest */ --- old/test/compiler/jvmci/compilerToVM/GetStackTraceElementTest.java 2017-04-20 21:50:16.000000000 +0200 +++ new/test/compiler/jvmci/compilerToVM/GetStackTraceElementTest.java 2017-04-20 21:50:16.000000000 +0200 @@ -34,6 +34,7 @@ * jdk.internal.vm.ci/jdk.vm.ci.code * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.GetStackTraceElementTest */ --- old/test/compiler/jvmci/compilerToVM/GetSymbolTest.java 2017-04-20 21:50:17.000000000 +0200 +++ new/test/compiler/jvmci/compilerToVM/GetSymbolTest.java 2017-04-20 21:50:17.000000000 +0200 @@ -35,6 +35,7 @@ * jdk.internal.vm.ci/jdk.vm.ci.meta * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.GetSymbolTest */ --- old/test/compiler/jvmci/compilerToVM/GetVtableIndexForInterfaceTest.java 2017-04-20 21:50:18.000000000 +0200 +++ new/test/compiler/jvmci/compilerToVM/GetVtableIndexForInterfaceTest.java 2017-04-20 21:50:17.000000000 +0200 @@ -34,6 +34,7 @@ * jdk.internal.vm.ci/jdk.vm.ci.code * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.GetVtableIndexForInterfaceTest */ --- old/test/compiler/jvmci/compilerToVM/HasCompiledCodeForOSRTest.java 2017-04-20 21:50:18.000000000 +0200 +++ new/test/compiler/jvmci/compilerToVM/HasCompiledCodeForOSRTest.java 2017-04-20 21:50:18.000000000 +0200 @@ -39,7 +39,7 @@ * @run main/othervm -Xbootclasspath/a:. * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI * -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI - * -XX:-BackgroundCompilation + * -XX:-BackgroundCompilation -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.HasCompiledCodeForOSRTest */ --- old/test/compiler/jvmci/compilerToVM/HasFinalizableSubclassTest.java 2017-04-20 21:50:19.000000000 +0200 +++ new/test/compiler/jvmci/compilerToVM/HasFinalizableSubclassTest.java 2017-04-20 21:50:19.000000000 +0200 @@ -31,7 +31,8 @@ * @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI - * compiler.jvmci.compilerToVM.HasFinalizableSubclassTest + * -Djvmci.Compiler=null + * compiler.jvmci.compilerToVM.HasFinalizableSubclassTest */ package compiler.jvmci.compilerToVM; --- old/test/compiler/jvmci/compilerToVM/HasNeverInlineDirectiveTest.java 2017-04-20 21:50:20.000000000 +0200 +++ new/test/compiler/jvmci/compilerToVM/HasNeverInlineDirectiveTest.java 2017-04-20 21:50:20.000000000 +0200 @@ -39,6 +39,7 @@ * @run main/othervm -Xbootclasspath/a:. * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI * -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.HasNeverInlineDirectiveTest */ --- old/test/compiler/jvmci/compilerToVM/InvalidateInstalledCodeTest.java 2017-04-20 21:50:20.000000000 +0200 +++ new/test/compiler/jvmci/compilerToVM/InvalidateInstalledCodeTest.java 2017-04-20 21:50:20.000000000 +0200 @@ -42,6 +42,7 @@ * @run main/othervm -Xbootclasspath/a:. * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI * -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.InvalidateInstalledCodeTest */ --- old/test/compiler/jvmci/compilerToVM/IsCompilableTest.java 2017-04-20 21:50:21.000000000 +0200 +++ new/test/compiler/jvmci/compilerToVM/IsCompilableTest.java 2017-04-20 21:50:21.000000000 +0200 @@ -39,10 +39,12 @@ * @run main/othervm -Xbootclasspath/a:. * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI * -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:+UseJVMCICompiler + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.IsCompilableTest * @run main/othervm -Xbootclasspath/a:. * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI * -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:-UseJVMCICompiler + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.IsCompilableTest */ --- old/test/compiler/jvmci/compilerToVM/IsMatureVsReprofileTest.java 2017-04-20 21:50:22.000000000 +0200 +++ new/test/compiler/jvmci/compilerToVM/IsMatureVsReprofileTest.java 2017-04-20 21:50:22.000000000 +0200 @@ -38,6 +38,7 @@ * sun.hotspot.WhiteBox$WhiteBoxPermission * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions * -XX:+WhiteBoxAPI -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -Xbatch + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.IsMatureVsReprofileTest */ --- old/test/compiler/jvmci/compilerToVM/LookupKlassInPoolTest.java 2017-04-20 21:50:23.000000000 +0200 +++ new/test/compiler/jvmci/compilerToVM/LookupKlassInPoolTest.java 2017-04-20 21:50:22.000000000 +0200 @@ -42,6 +42,7 @@ * @run main/othervm -Xbootclasspath/a:. * -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.LookupKlassInPoolTest */ --- old/test/compiler/jvmci/compilerToVM/LookupKlassRefIndexInPoolTest.java 2017-04-20 21:50:23.000000000 +0200 +++ new/test/compiler/jvmci/compilerToVM/LookupKlassRefIndexInPoolTest.java 2017-04-20 21:50:23.000000000 +0200 @@ -40,6 +40,7 @@ * sun.hotspot.WhiteBox$WhiteBoxPermission * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions * -XX:+WhiteBoxAPI -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.LookupKlassRefIndexInPoolTest */ --- old/test/compiler/jvmci/compilerToVM/LookupMethodInPoolTest.java 2017-04-20 21:50:24.000000000 +0200 +++ new/test/compiler/jvmci/compilerToVM/LookupMethodInPoolTest.java 2017-04-20 21:50:24.000000000 +0200 @@ -40,6 +40,7 @@ * sun.hotspot.WhiteBox$WhiteBoxPermission * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions * -XX:+WhiteBoxAPI -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.LookupMethodInPoolTest */ --- old/test/compiler/jvmci/compilerToVM/LookupNameAndTypeRefIndexInPoolTest.java 2017-04-20 21:50:25.000000000 +0200 +++ new/test/compiler/jvmci/compilerToVM/LookupNameAndTypeRefIndexInPoolTest.java 2017-04-20 21:50:25.000000000 +0200 @@ -40,6 +40,7 @@ * sun.hotspot.WhiteBox$WhiteBoxPermission * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions * -XX:+WhiteBoxAPI -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.LookupNameAndTypeRefIndexInPoolTest */ --- old/test/compiler/jvmci/compilerToVM/LookupNameInPoolTest.java 2017-04-20 21:50:26.000000000 +0200 +++ new/test/compiler/jvmci/compilerToVM/LookupNameInPoolTest.java 2017-04-20 21:50:25.000000000 +0200 @@ -41,6 +41,7 @@ * sun.hotspot.WhiteBox$WhiteBoxPermission * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions * -XX:+WhiteBoxAPI -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.LookupNameInPoolTest */ --- old/test/compiler/jvmci/compilerToVM/LookupSignatureInPoolTest.java 2017-04-20 21:50:26.000000000 +0200 +++ new/test/compiler/jvmci/compilerToVM/LookupSignatureInPoolTest.java 2017-04-20 21:50:26.000000000 +0200 @@ -41,6 +41,7 @@ * sun.hotspot.WhiteBox$WhiteBoxPermission * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions * -XX:+WhiteBoxAPI -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.LookupSignatureInPoolTest */ --- old/test/compiler/jvmci/compilerToVM/LookupTypeTest.java 2017-04-20 21:50:27.000000000 +0200 +++ new/test/compiler/jvmci/compilerToVM/LookupTypeTest.java 2017-04-20 21:50:27.000000000 +0200 @@ -31,6 +31,7 @@ * @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.LookupTypeTest */ --- old/test/compiler/jvmci/compilerToVM/MaterializeVirtualObjectTest.java 2017-04-20 21:50:28.000000000 +0200 +++ new/test/compiler/jvmci/compilerToVM/MaterializeVirtualObjectTest.java 2017-04-20 21:50:27.000000000 +0200 @@ -49,6 +49,7 @@ * -XX:+DoEscapeAnalysis -XX:-UseCounterDecay * -Dcompiler.jvmci.compilerToVM.MaterializeVirtualObjectTest.materializeFirst=true * -Dcompiler.jvmci.compilerToVM.MaterializeVirtualObjectTest.invalidate=false + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest * @run main/othervm -Xmixed -Xbatch -Xbootclasspath/a:. * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI @@ -60,6 +61,7 @@ * -XX:+DoEscapeAnalysis -XX:-UseCounterDecay * -Dcompiler.jvmci.compilerToVM.MaterializeVirtualObjectTest.materializeFirst=false * -Dcompiler.jvmci.compilerToVM.MaterializeVirtualObjectTest.invalidate=false + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest * @run main/othervm -Xmixed -Xbatch -Xbootclasspath/a:. * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI @@ -71,6 +73,7 @@ * -XX:+DoEscapeAnalysis -XX:-UseCounterDecay * -Dcompiler.jvmci.compilerToVM.MaterializeVirtualObjectTest.materializeFirst=true * -Dcompiler.jvmci.compilerToVM.MaterializeVirtualObjectTest.invalidate=true + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest * @run main/othervm -Xmixed -Xbatch -Xbootclasspath/a:. * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI @@ -82,6 +85,7 @@ * -XX:+DoEscapeAnalysis -XX:-UseCounterDecay * -Dcompiler.jvmci.compilerToVM.MaterializeVirtualObjectTest.materializeFirst=false * -Dcompiler.jvmci.compilerToVM.MaterializeVirtualObjectTest.invalidate=true + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest */ --- old/test/compiler/jvmci/compilerToVM/MethodIsIgnoredBySecurityStackWalkTest.java 2017-04-20 21:50:28.000000000 +0200 +++ new/test/compiler/jvmci/compilerToVM/MethodIsIgnoredBySecurityStackWalkTest.java 2017-04-20 21:50:28.000000000 +0200 @@ -35,6 +35,7 @@ * jdk.internal.vm.ci/jdk.vm.ci.code * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.MethodIsIgnoredBySecurityStackWalkTest */ --- old/test/compiler/jvmci/compilerToVM/ReadConfigurationTest.java 2017-04-20 21:50:29.000000000 +0200 +++ new/test/compiler/jvmci/compilerToVM/ReadConfigurationTest.java 2017-04-20 21:50:29.000000000 +0200 @@ -32,6 +32,7 @@ * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @build compiler.jvmci.compilerToVM.ReadConfigurationTest * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.ReadConfigurationTest */ --- old/test/compiler/jvmci/compilerToVM/ReprofileTest.java 2017-04-20 21:50:30.000000000 +0200 +++ new/test/compiler/jvmci/compilerToVM/ReprofileTest.java 2017-04-20 21:50:29.000000000 +0200 @@ -40,7 +40,7 @@ * @run main/othervm -Xbootclasspath/a:. * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI * -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI - * -Xmixed -Xbatch + * -Xmixed -Xbatch -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.ReprofileTest */ --- old/test/compiler/jvmci/compilerToVM/ResolveConstantInPoolTest.java 2017-04-20 21:50:30.000000000 +0200 +++ new/test/compiler/jvmci/compilerToVM/ResolveConstantInPoolTest.java 2017-04-20 21:50:30.000000000 +0200 @@ -40,6 +40,7 @@ * @run main/othervm -Xbootclasspath/a:. * -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.ResolveConstantInPoolTest */ --- old/test/compiler/jvmci/compilerToVM/ResolveFieldInPoolTest.java 2017-04-20 21:50:31.000000000 +0200 +++ new/test/compiler/jvmci/compilerToVM/ResolveFieldInPoolTest.java 2017-04-20 21:50:31.000000000 +0200 @@ -40,6 +40,7 @@ * sun.hotspot.WhiteBox$WhiteBoxPermission * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions * -XX:+WhiteBoxAPI -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.ResolveFieldInPoolTest */ --- old/test/compiler/jvmci/compilerToVM/ResolveMethodTest.java 2017-04-20 21:50:32.000000000 +0200 +++ new/test/compiler/jvmci/compilerToVM/ResolveMethodTest.java 2017-04-20 21:50:31.000000000 +0200 @@ -34,6 +34,7 @@ * jdk.internal.vm.ci/jdk.vm.ci.code * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.ResolveMethodTest */ --- old/test/compiler/jvmci/compilerToVM/ResolvePossiblyCachedConstantInPoolTest.java 2017-04-20 21:50:32.000000000 +0200 +++ new/test/compiler/jvmci/compilerToVM/ResolvePossiblyCachedConstantInPoolTest.java 2017-04-20 21:50:32.000000000 +0200 @@ -40,6 +40,7 @@ * sun.hotspot.WhiteBox$WhiteBoxPermission * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions * -XX:+WhiteBoxAPI -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.ResolvePossiblyCachedConstantInPoolTest */ --- old/test/compiler/jvmci/compilerToVM/ResolveTypeInPoolTest.java 2017-04-20 21:50:33.000000000 +0200 +++ new/test/compiler/jvmci/compilerToVM/ResolveTypeInPoolTest.java 2017-04-20 21:50:33.000000000 +0200 @@ -41,6 +41,7 @@ * @run main/othervm -Xbootclasspath/a:. * -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.ResolveTypeInPoolTest */ --- old/test/compiler/jvmci/compilerToVM/ShouldInlineMethodTest.java 2017-04-20 21:50:33.000000000 +0200 +++ new/test/compiler/jvmci/compilerToVM/ShouldInlineMethodTest.java 2017-04-20 21:50:33.000000000 +0200 @@ -39,6 +39,7 @@ * @run main/othervm -Xbootclasspath/a:. * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI * -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.ShouldInlineMethodTest */ --- old/test/compiler/jvmci/errors/TestInvalidCompilationResult.java 2017-04-20 21:50:34.000000000 +0200 +++ new/test/compiler/jvmci/errors/TestInvalidCompilationResult.java 2017-04-20 21:50:34.000000000 +0200 @@ -31,7 +31,8 @@ * jdk.internal.vm.ci/jdk.vm.ci.runtime * jdk.internal.vm.ci/jdk.vm.ci.common * @compile CodeInstallerTest.java - * @run junit/othervm -da:jdk.vm.ci... -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI compiler.jvmci.errors.TestInvalidCompilationResult + * @run junit/othervm -da:jdk.vm.ci... -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -Djvmci.Compiler=null compiler.jvmci.errors.TestInvalidCompilationResult */ package compiler.jvmci.errors; --- old/test/compiler/jvmci/errors/TestInvalidDebugInfo.java 2017-04-20 21:50:35.000000000 +0200 +++ new/test/compiler/jvmci/errors/TestInvalidDebugInfo.java 2017-04-20 21:50:35.000000000 +0200 @@ -31,7 +31,8 @@ * jdk.internal.vm.ci/jdk.vm.ci.runtime * jdk.internal.vm.ci/jdk.vm.ci.common * @compile CodeInstallerTest.java - * @run junit/othervm -da:jdk.vm.ci... -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI compiler.jvmci.errors.TestInvalidDebugInfo + * @run junit/othervm -da:jdk.vm.ci... -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -Djvmci.Compiler=null compiler.jvmci.errors.TestInvalidDebugInfo */ package compiler.jvmci.errors; --- old/test/compiler/jvmci/errors/TestInvalidOopMap.java 2017-04-20 21:50:36.000000000 +0200 +++ new/test/compiler/jvmci/errors/TestInvalidOopMap.java 2017-04-20 21:50:35.000000000 +0200 @@ -31,7 +31,8 @@ * jdk.internal.vm.ci/jdk.vm.ci.runtime * jdk.internal.vm.ci/jdk.vm.ci.common * @compile CodeInstallerTest.java - * @run junit/othervm -da:jdk.vm.ci... -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI compiler.jvmci.errors.TestInvalidOopMap + * @run junit/othervm -da:jdk.vm.ci... -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -Djvmci.Compiler=null compiler.jvmci.errors.TestInvalidOopMap */ package compiler.jvmci.errors; --- old/test/compiler/jvmci/events/JvmciNotifyInstallEventTest.java 2017-04-20 21:50:36.000000000 +0200 +++ new/test/compiler/jvmci/events/JvmciNotifyInstallEventTest.java 2017-04-20 21:50:36.000000000 +0200 @@ -52,17 +52,17 @@ * -Dcompiler.jvmci.events.JvmciNotifyInstallEventTest.failoninit=false * compiler.jvmci.events.JvmciNotifyInstallEventTest * @run main/othervm -XX:+UnlockExperimentalVMOptions - * -Djvmci.compiler=EmptyCompiler -Xbootclasspath/a:. -Xmixed + * -Djvmci.Compiler=EmptyCompiler -Xbootclasspath/a:. -Xmixed * -XX:+UseJVMCICompiler -XX:-BootstrapJVMCI * -Dcompiler.jvmci.events.JvmciNotifyInstallEventTest.failoninit=false * compiler.jvmci.events.JvmciNotifyInstallEventTest * @run main/othervm -XX:+UnlockExperimentalVMOptions - * -Djvmci.compiler=EmptyCompiler -Xbootclasspath/a:. -Xmixed + * -Djvmci.Compiler=EmptyCompiler -Xbootclasspath/a:. -Xmixed * -XX:+UseJVMCICompiler -XX:-BootstrapJVMCI -XX:JVMCINMethodSizeLimit=0 * -Dcompiler.jvmci.events.JvmciNotifyInstallEventTest.failoninit=false * compiler.jvmci.events.JvmciNotifyInstallEventTest * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:-EnableJVMCI - * -Djvmci.compiler=EmptyCompiler -Xbootclasspath/a:. -Xmixed + * -Djvmci.Compiler=EmptyCompiler -Xbootclasspath/a:. -Xmixed * -Dcompiler.jvmci.events.JvmciNotifyInstallEventTest.failoninit=true * compiler.jvmci.events.JvmciNotifyInstallEventTest */ --- old/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/DataPatchTest.java 2017-04-20 21:50:37.000000000 +0200 +++ new/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/DataPatchTest.java 2017-04-20 21:50:37.000000000 +0200 @@ -33,7 +33,7 @@ * jdk.internal.vm.ci/jdk.vm.ci.amd64 * jdk.internal.vm.ci/jdk.vm.ci.sparc * @compile CodeInstallationTest.java DebugInfoTest.java TestAssembler.java TestHotSpotVMConfig.java amd64/AMD64TestAssembler.java sparc/SPARCTestAssembler.java - * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.code.test.DataPatchTest + * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -Djvmci.Compiler=null jdk.vm.ci.code.test.DataPatchTest */ package jdk.vm.ci.code.test; --- old/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/InterpreterFrameSizeTest.java 2017-04-20 21:50:38.000000000 +0200 +++ new/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/InterpreterFrameSizeTest.java 2017-04-20 21:50:38.000000000 +0200 @@ -33,7 +33,7 @@ * jdk.internal.vm.ci/jdk.vm.ci.amd64 * jdk.internal.vm.ci/jdk.vm.ci.sparc * @compile CodeInstallationTest.java TestAssembler.java TestHotSpotVMConfig.java amd64/AMD64TestAssembler.java sparc/SPARCTestAssembler.java - * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.code.test.InterpreterFrameSizeTest + * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -Djvmci.Compiler=null jdk.vm.ci.code.test.InterpreterFrameSizeTest */ package jdk.vm.ci.code.test; --- old/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/MaxOopMapStackOffsetTest.java 2017-04-20 21:50:38.000000000 +0200 +++ new/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/MaxOopMapStackOffsetTest.java 2017-04-20 21:50:38.000000000 +0200 @@ -34,7 +34,7 @@ * jdk.internal.vm.ci/jdk.vm.ci.amd64 * jdk.internal.vm.ci/jdk.vm.ci.sparc * @compile CodeInstallationTest.java DebugInfoTest.java TestAssembler.java TestHotSpotVMConfig.java amd64/AMD64TestAssembler.java sparc/SPARCTestAssembler.java - * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.code.test.MaxOopMapStackOffsetTest + * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -Djvmci.Compiler=null jdk.vm.ci.code.test.MaxOopMapStackOffsetTest */ package jdk.vm.ci.code.test; --- old/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/SimpleCodeInstallationTest.java 2017-04-20 21:50:39.000000000 +0200 +++ new/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/SimpleCodeInstallationTest.java 2017-04-20 21:50:39.000000000 +0200 @@ -33,7 +33,7 @@ * jdk.internal.vm.ci/jdk.vm.ci.amd64 * jdk.internal.vm.ci/jdk.vm.ci.sparc * @compile CodeInstallationTest.java DebugInfoTest.java TestAssembler.java TestHotSpotVMConfig.java amd64/AMD64TestAssembler.java sparc/SPARCTestAssembler.java - * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.code.test.SimpleCodeInstallationTest + * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -Djvmci.Compiler=null jdk.vm.ci.code.test.SimpleCodeInstallationTest */ package jdk.vm.ci.code.test; --- old/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/SimpleDebugInfoTest.java 2017-04-20 21:50:40.000000000 +0200 +++ new/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/SimpleDebugInfoTest.java 2017-04-20 21:50:40.000000000 +0200 @@ -33,7 +33,7 @@ * jdk.internal.vm.ci/jdk.vm.ci.amd64 * jdk.internal.vm.ci/jdk.vm.ci.sparc * @compile CodeInstallationTest.java DebugInfoTest.java TestAssembler.java TestHotSpotVMConfig.java amd64/AMD64TestAssembler.java sparc/SPARCTestAssembler.java - * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.code.test.SimpleDebugInfoTest + * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -Djvmci.Compiler=null jdk.vm.ci.code.test.SimpleDebugInfoTest */ package jdk.vm.ci.code.test; --- old/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/VirtualObjectDebugInfoTest.java 2017-04-20 21:50:40.000000000 +0200 +++ new/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/VirtualObjectDebugInfoTest.java 2017-04-20 21:50:40.000000000 +0200 @@ -33,7 +33,7 @@ * jdk.internal.vm.ci/jdk.vm.ci.amd64 * jdk.internal.vm.ci/jdk.vm.ci.sparc * @compile CodeInstallationTest.java DebugInfoTest.java TestAssembler.java TestHotSpotVMConfig.java amd64/AMD64TestAssembler.java sparc/SPARCTestAssembler.java - * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.code.test.VirtualObjectDebugInfoTest + * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -Djvmci.Compiler=null jdk.vm.ci.code.test.VirtualObjectDebugInfoTest */ package jdk.vm.ci.code.test; --- old/test/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/HotSpotConstantReflectionProviderTest.java 2017-04-20 21:50:41.000000000 +0200 +++ new/test/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/HotSpotConstantReflectionProviderTest.java 2017-04-20 21:50:41.000000000 +0200 @@ -34,7 +34,7 @@ * @run driver ClassFileInstaller jdk.vm.ci.hotspot.test.DummyClass * @run testng/othervm/timeout=300 -Xbootclasspath/a:. * -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI - * jdk.vm.ci.hotspot.test.HotSpotConstantReflectionProviderTest + * -Djvmci.Compiler=null jdk.vm.ci.hotspot.test.HotSpotConstantReflectionProviderTest */ package jdk.vm.ci.hotspot.test; --- old/test/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/MemoryAccessProviderTest.java 2017-04-20 21:50:42.000000000 +0200 +++ new/test/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/MemoryAccessProviderTest.java 2017-04-20 21:50:42.000000000 +0200 @@ -37,7 +37,7 @@ * @run testng/othervm -Xbootclasspath/a:. * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI * -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI - * jdk.vm.ci.hotspot.test.MemoryAccessProviderTest + * -Djvmci.Compiler=null jdk.vm.ci.hotspot.test.MemoryAccessProviderTest */ package jdk.vm.ci.hotspot.test; --- old/test/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/MethodHandleAccessProviderTest.java 2017-04-20 21:50:43.000000000 +0200 +++ new/test/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/MethodHandleAccessProviderTest.java 2017-04-20 21:50:42.000000000 +0200 @@ -32,7 +32,7 @@ * jdk.internal.vm.ci/jdk.vm.ci.runtime * @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot:+open * @run testng/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI - * jdk.vm.ci.hotspot.test.MethodHandleAccessProviderTest + * -Djvmci.Compiler=null jdk.vm.ci.hotspot.test.MethodHandleAccessProviderTest */ package jdk.vm.ci.hotspot.test; --- old/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/ConstantTest.java 2017-04-20 21:50:43.000000000 +0200 +++ new/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/ConstantTest.java 2017-04-20 21:50:43.000000000 +0200 @@ -28,7 +28,7 @@ * @modules jdk.internal.vm.ci/jdk.vm.ci.meta * jdk.internal.vm.ci/jdk.vm.ci.runtime * java.base/jdk.internal.misc - * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.runtime.test.ConstantTest + * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -Djvmci.Compiler=null jdk.vm.ci.runtime.test.ConstantTest */ package jdk.vm.ci.runtime.test; --- old/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/RedefineClassTest.java 2017-04-20 21:50:44.000000000 +0200 +++ new/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/RedefineClassTest.java 2017-04-20 21:50:44.000000000 +0200 @@ -29,7 +29,7 @@ * jdk.internal.vm.ci/jdk.vm.ci.runtime * jdk.attach * java.base/jdk.internal.misc - * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.runtime.test.RedefineClassTest + * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -Djvmci.Compiler=null jdk.vm.ci.runtime.test.RedefineClassTest */ package jdk.vm.ci.runtime.test; --- old/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/ResolvedJavaTypeResolveConcreteMethodTest.java 2017-04-20 21:50:44.000000000 +0200 +++ new/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/ResolvedJavaTypeResolveConcreteMethodTest.java 2017-04-20 21:50:44.000000000 +0200 @@ -26,7 +26,7 @@ * @requires vm.jvmci * @modules jdk.internal.vm.ci/jdk.vm.ci.meta * jdk.internal.vm.ci/jdk.vm.ci.runtime - * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.runtime.test.ResolvedJavaTypeResolveConcreteMethodTest + * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -Djvmci.Compiler=null jdk.vm.ci.runtime.test.ResolvedJavaTypeResolveConcreteMethodTest */ package jdk.vm.ci.runtime.test; --- old/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/ResolvedJavaTypeResolveMethodTest.java 2017-04-20 21:50:45.000000000 +0200 +++ new/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/ResolvedJavaTypeResolveMethodTest.java 2017-04-20 21:50:45.000000000 +0200 @@ -26,7 +26,7 @@ * @requires vm.jvmci * @modules jdk.internal.vm.ci/jdk.vm.ci.meta * jdk.internal.vm.ci/jdk.vm.ci.runtime - * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.runtime.test.ResolvedJavaTypeResolveMethodTest + * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -Djvmci.Compiler=null jdk.vm.ci.runtime.test.ResolvedJavaTypeResolveMethodTest */ package jdk.vm.ci.runtime.test; --- old/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestConstantReflectionProvider.java 2017-04-20 21:50:46.000000000 +0200 +++ new/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestConstantReflectionProvider.java 2017-04-20 21:50:46.000000000 +0200 @@ -28,7 +28,7 @@ * @modules jdk.internal.vm.ci/jdk.vm.ci.meta * jdk.internal.vm.ci/jdk.vm.ci.runtime * java.base/jdk.internal.misc - * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.runtime.test.TestConstantReflectionProvider + * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -Djvmci.Compiler=null jdk.vm.ci.runtime.test.TestConstantReflectionProvider */ package jdk.vm.ci.runtime.test; --- old/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestJavaField.java 2017-04-20 21:50:46.000000000 +0200 +++ new/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestJavaField.java 2017-04-20 21:50:46.000000000 +0200 @@ -28,7 +28,7 @@ * @modules jdk.internal.vm.ci/jdk.vm.ci.meta * jdk.internal.vm.ci/jdk.vm.ci.runtime * java.base/jdk.internal.misc - * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.runtime.test.TestJavaField + * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -Djvmci.Compiler=null jdk.vm.ci.runtime.test.TestJavaField */ package jdk.vm.ci.runtime.test; --- old/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestJavaMethod.java 2017-04-20 21:50:47.000000000 +0200 +++ new/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestJavaMethod.java 2017-04-20 21:50:47.000000000 +0200 @@ -28,7 +28,7 @@ * @modules jdk.internal.vm.ci/jdk.vm.ci.meta * jdk.internal.vm.ci/jdk.vm.ci.runtime * java.base/jdk.internal.misc - * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.runtime.test.TestJavaMethod + * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -Djvmci.Compiler=null jdk.vm.ci.runtime.test.TestJavaMethod */ package jdk.vm.ci.runtime.test; --- old/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestJavaType.java 2017-04-20 21:50:48.000000000 +0200 +++ new/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestJavaType.java 2017-04-20 21:50:48.000000000 +0200 @@ -28,7 +28,7 @@ * @modules jdk.internal.vm.ci/jdk.vm.ci.meta * jdk.internal.vm.ci/jdk.vm.ci.runtime * java.base/jdk.internal.misc - * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.runtime.test.TestJavaType + * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -Djvmci.Compiler=null jdk.vm.ci.runtime.test.TestJavaType */ package jdk.vm.ci.runtime.test; --- old/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestMetaAccessProvider.java 2017-04-20 21:50:48.000000000 +0200 +++ new/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestMetaAccessProvider.java 2017-04-20 21:50:48.000000000 +0200 @@ -28,7 +28,7 @@ * @modules jdk.internal.vm.ci/jdk.vm.ci.meta * jdk.internal.vm.ci/jdk.vm.ci.runtime * java.base/jdk.internal.misc - * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.runtime.test.TestMetaAccessProvider + * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -Djvmci.Compiler=null jdk.vm.ci.runtime.test.TestMetaAccessProvider */ package jdk.vm.ci.runtime.test; --- old/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaField.java 2017-04-20 21:50:49.000000000 +0200 +++ new/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaField.java 2017-04-20 21:50:49.000000000 +0200 @@ -28,7 +28,7 @@ * @modules jdk.internal.vm.ci/jdk.vm.ci.meta * jdk.internal.vm.ci/jdk.vm.ci.runtime * java.base/jdk.internal.misc - * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.runtime.test.TestResolvedJavaField + * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -Djvmci.Compiler=null jdk.vm.ci.runtime.test.TestResolvedJavaField */ package jdk.vm.ci.runtime.test; --- old/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaMethod.java 2017-04-20 21:50:50.000000000 +0200 +++ new/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaMethod.java 2017-04-20 21:50:49.000000000 +0200 @@ -28,7 +28,7 @@ * @modules jdk.internal.vm.ci/jdk.vm.ci.meta * jdk.internal.vm.ci/jdk.vm.ci.runtime * java.base/jdk.internal.misc - * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.runtime.test.TestResolvedJavaMethod + * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -Djvmci.Compiler=null jdk.vm.ci.runtime.test.TestResolvedJavaMethod */ package jdk.vm.ci.runtime.test; --- old/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaType.java 2017-04-20 21:50:50.000000000 +0200 +++ new/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaType.java 2017-04-20 21:50:50.000000000 +0200 @@ -30,7 +30,7 @@ * jdk.internal.vm.ci/jdk.vm.ci.runtime * jdk.internal.vm.ci/jdk.vm.ci.common * java.base/jdk.internal.misc - * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.runtime.test.TestResolvedJavaType + * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -Djvmci.Compiler=null jdk.vm.ci.runtime.test.TestResolvedJavaType */ package jdk.vm.ci.runtime.test; --- old/test/compiler/jvmci/meta/StableFieldTest.java 2017-04-20 21:50:51.000000000 +0200 +++ new/test/compiler/jvmci/meta/StableFieldTest.java 2017-04-20 21:50:51.000000000 +0200 @@ -34,7 +34,7 @@ * * @compile StableFieldTest.java * @run driver ClassFileInstaller compiler.jvmci.meta.StableFieldTest - * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -Xbootclasspath/a:. compiler.jvmci.meta.StableFieldTest + * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -Djvmci.Compiler=null -Xbootclasspath/a:. compiler.jvmci.meta.StableFieldTest */ package compiler.jvmci.meta; --- /dev/null 2017-04-20 21:50:52.000000000 +0200 +++ new/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.services/src/jdk/vm/ci/services/internal/ReflectionAccessJDK.java 2017-04-20 21:50:51.000000000 +0200 @@ -0,0 +1,91 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package jdk.vm.ci.services.internal; + +import java.lang.reflect.Method; +import java.util.Set; + +import jdk.vm.ci.services.Services; + +/** + * Reflection based access to API introduced in JDK 9. This allows the API to be used in code that + * must be compiled (but not executed) on JDK 8. + */ +public final class ReflectionAccessJDK { + + /** + * {@code Class.getModule()}. + */ + private static final Method getModule; + + /** + * {@code java.lang.Module.addOpens(String, Module)}. + */ + private static final Method addOpens; + + /** + * {@code java.lang.Module.getPackages(Module, String, Module)}. + */ + private static final Method getPackages; + + /** + * {@code java.lang.Module.isOpen(String, Module)}. + */ + private static final Method isOpenTo; + + /** + * Opens all JVMCI packages to the module of a given class. + * + * @param other all JVMCI packages will be opened to the module of this class + */ + @SuppressWarnings("unchecked") + public static void openJVMCITo(Class other) { + try { + Object jvmci = getModule.invoke(Services.class); + Object otherModule = getModule.invoke(other); + if (jvmci != otherModule) { + Set packages = (Set) getPackages.invoke(jvmci); + for (String pkg : packages) { + boolean opened = (Boolean) isOpenTo.invoke(jvmci, pkg, otherModule); + if (!opened) { + addOpens.invoke(jvmci, pkg, otherModule); + } + } + } + } catch (Exception e) { + throw new InternalError(e); + } + } + + static { + try { + getModule = Class.class.getMethod("getModule"); + Class moduleClass = getModule.getReturnType(); + getPackages = moduleClass.getMethod("getPackages"); + isOpenTo = moduleClass.getMethod("isOpen", String.class, moduleClass); + addOpens = moduleClass.getDeclaredMethod("addOpens", String.class, moduleClass); + } catch (NoSuchMethodException | SecurityException e) { + throw new InternalError(e); + } + } +}