use of org.graalvm.compiler.replacements.classfile.ClassfileBytecodeProvider in project graal by oracle.
the class ReplacementsTest method getSystemClassLoaderBytecodeProvider.
/**
* Gets a {@link ClassfileBytecodeProvider} that enables snippets and intrinsics to be loaded
* from the system class path (instead of from the JVMCI class path or Graal module).
*/
protected final ClassfileBytecodeProvider getSystemClassLoaderBytecodeProvider() {
ReplacementsImpl d = (ReplacementsImpl) getReplacements();
MetaAccessProvider metaAccess = d.providers.getMetaAccess();
ClassfileBytecodeProvider bytecodeProvider = new ClassfileBytecodeProvider(metaAccess, d.snippetReflection, ClassLoader.getSystemClassLoader());
return bytecodeProvider;
}
use of org.graalvm.compiler.replacements.classfile.ClassfileBytecodeProvider in project graal by oracle.
the class ClassfileBytecodeProviderTest method checkClass.
protected void checkClass(MetaAccessProvider metaAccess, SnippetReflectionProvider snippetReflection, String className) throws ClassNotFoundException {
Class<?> c = Class.forName(className, true, getClass().getClassLoader());
ClassfileBytecodeProvider cbp = new ClassfileBytecodeProvider(metaAccess, snippetReflection);
for (Method method : c.getDeclaredMethods()) {
checkMethod(cbp, metaAccess, method);
}
}
Aggregations