< prev index next >
src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/IsGraalPredicate.java
Print this page
@@ -22,14 +22,10 @@
*/
package org.graalvm.compiler.hotspot;
-import static jdk.vm.ci.hotspot.HotSpotJVMCICompilerFactory.CompilationLevelAdjustment.None;
-
-import org.graalvm.compiler.debug.GraalError;
-
import jdk.vm.ci.hotspot.HotSpotJVMCICompilerFactory;
import jdk.vm.ci.hotspot.HotSpotJVMCIRuntime;
/**
* Determines if a given class is a JVMCI or Graal class for the purpose of
@@ -58,19 +54,19 @@
}
@Override
void onCompilerConfigurationFactorySelection(HotSpotJVMCIRuntime runtime, CompilerConfigurationFactory factory) {
compilerConfigurationModule = factory.getClass().getModule();
- runtime.excludeFromJVMCICompilation(jvmciModule, graalModule, compilerConfigurationModule);
}
@Override
boolean apply(Class<?> declaringClass) {
- throw GraalError.shouldNotReachHere();
+ Module module = declaringClass.getModule();
+ return jvmciModule == module || graalModule == module || compilerConfigurationModule == module;
}
@Override
HotSpotJVMCICompilerFactory.CompilationLevelAdjustment getCompilationLevelAdjustment() {
- return None;
+ return HotSpotJVMCICompilerFactory.CompilationLevelAdjustment.ByHolder;
}
-
}
+
< prev index next >