use of org.graalvm.compiler.hotspot.meta.HotSpotClassInitializationPlugin in project graal by oracle.
the class ReplaceConstantNodesPhaseTest method getDefaultGraphBuilderPlugins.
@Override
protected Plugins getDefaultGraphBuilderPlugins() {
Plugins plugins = super.getDefaultGraphBuilderPlugins();
plugins.setClassInitializationPlugin(new HotSpotClassInitializationPlugin());
return plugins;
}
use of org.graalvm.compiler.hotspot.meta.HotSpotClassInitializationPlugin in project graal by oracle.
the class EliminateRedundantInitializationPhaseTest method getDefaultGraphBuilderPlugins.
@Override
protected Plugins getDefaultGraphBuilderPlugins() {
Plugins plugins = super.getDefaultGraphBuilderPlugins();
plugins.setClassInitializationPlugin(new HotSpotClassInitializationPlugin());
return plugins;
}
use of org.graalvm.compiler.hotspot.meta.HotSpotClassInitializationPlugin in project graal by oracle.
the class HotSpotInvokeDynamicPluginTest method getDefaultGraphBuilderPlugins.
@Override
protected Plugins getDefaultGraphBuilderPlugins() {
Plugins plugins = super.getDefaultGraphBuilderPlugins();
plugins.setClassInitializationPlugin(new HotSpotClassInitializationPlugin());
plugins.setInvokeDynamicPlugin(new HotSpotInvokeDynamicPlugin() {
@Override
public boolean isResolvedDynamicInvoke(GraphBuilderContext builder, int index, int opcode) {
// Allow invokedynamic testing with older JVMCI
ResolvedJavaMethod m = builder.getMethod();
if (m.getName().startsWith("invokeDynamic") && m.getDeclaringClass().getName().equals("Lorg/graalvm/compiler/hotspot/test/HotSpotInvokeDynamicPluginTest;")) {
return false;
}
return super.isResolvedDynamicInvoke(builder, index, opcode);
}
@Override
public boolean supportsDynamicInvoke(GraphBuilderContext builder, int index, int opcode) {
// Allow invokehandle testing with older JVMCI
ResolvedJavaMethod m = builder.getMethod();
if (m.getName().startsWith("invokeHandle") && m.getDeclaringClass().getName().equals("Lorg/graalvm/compiler/hotspot/test/HotSpotInvokeDynamicPluginTest;")) {
return true;
}
return super.supportsDynamicInvoke(builder, index, opcode);
}
});
return plugins;
}
Aggregations