package org.graalvm.compiler.nodes.spi;
import org.graalvm.compiler.api.replacements.SnippetTemplateCache;
import org.graalvm.compiler.bytecode.Bytecode;
import org.graalvm.compiler.bytecode.BytecodeProvider;
import org.graalvm.compiler.core.common.CompilationIdentifier;
import org.graalvm.compiler.debug.DebugContext;
import org.graalvm.compiler.graph.NodeSourcePosition;
import org.graalvm.compiler.nodes.StructuredGraph;
import org.graalvm.compiler.nodes.graphbuilderconf.GraphBuilderConfiguration;
import org.graalvm.compiler.nodes.graphbuilderconf.GraphBuilderPlugin;
import org.graalvm.compiler.options.OptionValues;
import jdk.vm.ci.meta.ResolvedJavaMethod;
public class DelegatingReplacements implements Replacements {
protected final Replacements delegate;
public DelegatingReplacements(Replacements delegate) {
this.delegate = delegate;
}
@Override
public OptionValues getOptions() {
return delegate.getOptions();
}
@Override
public GraphBuilderConfiguration.Plugins getGraphBuilderPlugins() {
return delegate.getGraphBuilderPlugins();
}
@Override
public Class<? extends GraphBuilderPlugin> getIntrinsifyingPlugin(ResolvedJavaMethod method) {
return delegate.getIntrinsifyingPlugin(method);
}
@Override
public StructuredGraph getSnippet(ResolvedJavaMethod method, Object[] args, boolean trackNodeSourcePosition, NodeSourcePosition replaceePosition) {
return delegate.getSnippet(method, args, trackNodeSourcePosition, replaceePosition);
}
@Override
public StructuredGraph getSnippet(ResolvedJavaMethod method, ResolvedJavaMethod recursiveEntry, Object[] args, boolean trackNodeSourcePosition, NodeSourcePosition replaceePosition) {
return delegate.getSnippet(method, recursiveEntry, args, trackNodeSourcePosition, replaceePosition);
}
@Override
public void registerSnippet(ResolvedJavaMethod method, ResolvedJavaMethod original, Object receiver, boolean trackNodeSourcePosition) {
delegate.registerSnippet(method, original, receiver, trackNodeSourcePosition);
}
@Override
public StructuredGraph getSubstitution(ResolvedJavaMethod method, int invokeBci, boolean trackNodeSourcePosition, NodeSourcePosition replaceePosition) {
return delegate.getSubstitution(method, invokeBci, trackNodeSourcePosition, replaceePosition);
}
@Override
public Bytecode getSubstitutionBytecode(ResolvedJavaMethod method) {
return delegate.getSubstitutionBytecode(method);
}
@Override
public StructuredGraph getIntrinsicGraph(ResolvedJavaMethod method, CompilationIdentifier compilationId, DebugContext debug) {
return delegate.getIntrinsicGraph(method, compilationId, debug);
}
@Override
public boolean hasSubstitution(ResolvedJavaMethod method, int invokeBci) {
return delegate.hasSubstitution(method, invokeBci);
}
@Override
public BytecodeProvider getDefaultReplacementBytecodeProvider() {
return delegate.getDefaultReplacementBytecodeProvider();
}
@Override
public void registerSnippetTemplateCache(SnippetTemplateCache snippetTemplates) {
delegate.registerSnippetTemplateCache(snippetTemplates);
}
@Override
public <T extends SnippetTemplateCache> T getSnippetTemplateCache(Class<T> templatesClass) {
return delegate.getSnippetTemplateCache(templatesClass);
}
}