< prev index next >

src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/IntrinsicGraphBuilder.java

Print this page




  23 
  24 
  25 package org.graalvm.compiler.replacements;
  26 
  27 import org.graalvm.compiler.bytecode.Bytecode;
  28 import org.graalvm.compiler.bytecode.BytecodeProvider;
  29 import org.graalvm.compiler.core.common.spi.ConstantFieldProvider;
  30 import org.graalvm.compiler.core.common.type.Stamp;
  31 import org.graalvm.compiler.core.common.type.StampFactory;
  32 import org.graalvm.compiler.core.common.type.StampPair;
  33 import org.graalvm.compiler.core.common.type.TypeReference;
  34 import org.graalvm.compiler.debug.DebugCloseable;
  35 import org.graalvm.compiler.debug.DebugContext;
  36 import org.graalvm.compiler.debug.GraalError;
  37 import org.graalvm.compiler.graph.NodeSourcePosition;
  38 import org.graalvm.compiler.nodes.CallTargetNode;
  39 import org.graalvm.compiler.nodes.CallTargetNode.InvokeKind;
  40 import org.graalvm.compiler.nodes.FixedNode;
  41 import org.graalvm.compiler.nodes.FixedWithNextNode;
  42 import org.graalvm.compiler.nodes.FrameState;

  43 import org.graalvm.compiler.nodes.ParameterNode;
  44 import org.graalvm.compiler.nodes.ReturnNode;
  45 import org.graalvm.compiler.nodes.StateSplit;
  46 import org.graalvm.compiler.nodes.StructuredGraph;
  47 import org.graalvm.compiler.nodes.StructuredGraph.AllowAssumptions;
  48 import org.graalvm.compiler.nodes.ValueNode;
  49 import org.graalvm.compiler.nodes.graphbuilderconf.GraphBuilderContext;
  50 import org.graalvm.compiler.nodes.graphbuilderconf.IntrinsicContext;
  51 import org.graalvm.compiler.nodes.graphbuilderconf.InvocationPlugin;
  52 import org.graalvm.compiler.nodes.graphbuilderconf.InvocationPlugin.Receiver;
  53 import org.graalvm.compiler.nodes.spi.StampProvider;
  54 import org.graalvm.compiler.options.OptionValues;
  55 
  56 import jdk.vm.ci.code.BailoutException;
  57 import jdk.vm.ci.code.BytecodeFrame;
  58 import jdk.vm.ci.meta.ConstantReflectionProvider;
  59 import jdk.vm.ci.meta.JavaKind;
  60 import jdk.vm.ci.meta.JavaType;
  61 import jdk.vm.ci.meta.MetaAccessProvider;
  62 import jdk.vm.ci.meta.ResolvedJavaMethod;


 146     @Override
 147     public <T extends ValueNode> T append(T v) {
 148         if (v.graph() != null) {
 149             return v;
 150         }
 151         T added = graph.addOrUniqueWithInputs(v);
 152         if (added == v) {
 153             updateLastInstruction(v);
 154         }
 155         return added;
 156     }
 157 
 158     @Override
 159     public void push(JavaKind kind, ValueNode value) {
 160         assert kind != JavaKind.Void;
 161         assert returnValue == null;
 162         returnValue = value;
 163     }
 164 
 165     @Override
 166     public void handleReplacedInvoke(InvokeKind invokeKind, ResolvedJavaMethod targetMethod, ValueNode[] args, boolean forceInlineEverything) {
 167         throw GraalError.shouldNotReachHere();
 168     }
 169 
 170     @Override
 171     public void handleReplacedInvoke(CallTargetNode callTarget, JavaKind resultType) {
 172         throw GraalError.shouldNotReachHere();
 173     }
 174 
 175     @Override
 176     public StampProvider getStampProvider() {
 177         return stampProvider;
 178     }
 179 
 180     @Override
 181     public MetaAccessProvider getMetaAccess() {
 182         return metaAccess;
 183     }
 184 
 185     @Override
 186     public ConstantReflectionProvider getConstantReflection() {




  23 
  24 
  25 package org.graalvm.compiler.replacements;
  26 
  27 import org.graalvm.compiler.bytecode.Bytecode;
  28 import org.graalvm.compiler.bytecode.BytecodeProvider;
  29 import org.graalvm.compiler.core.common.spi.ConstantFieldProvider;
  30 import org.graalvm.compiler.core.common.type.Stamp;
  31 import org.graalvm.compiler.core.common.type.StampFactory;
  32 import org.graalvm.compiler.core.common.type.StampPair;
  33 import org.graalvm.compiler.core.common.type.TypeReference;
  34 import org.graalvm.compiler.debug.DebugCloseable;
  35 import org.graalvm.compiler.debug.DebugContext;
  36 import org.graalvm.compiler.debug.GraalError;
  37 import org.graalvm.compiler.graph.NodeSourcePosition;
  38 import org.graalvm.compiler.nodes.CallTargetNode;
  39 import org.graalvm.compiler.nodes.CallTargetNode.InvokeKind;
  40 import org.graalvm.compiler.nodes.FixedNode;
  41 import org.graalvm.compiler.nodes.FixedWithNextNode;
  42 import org.graalvm.compiler.nodes.FrameState;
  43 import org.graalvm.compiler.nodes.Invoke;
  44 import org.graalvm.compiler.nodes.ParameterNode;
  45 import org.graalvm.compiler.nodes.ReturnNode;
  46 import org.graalvm.compiler.nodes.StateSplit;
  47 import org.graalvm.compiler.nodes.StructuredGraph;
  48 import org.graalvm.compiler.nodes.StructuredGraph.AllowAssumptions;
  49 import org.graalvm.compiler.nodes.ValueNode;
  50 import org.graalvm.compiler.nodes.graphbuilderconf.GraphBuilderContext;
  51 import org.graalvm.compiler.nodes.graphbuilderconf.IntrinsicContext;
  52 import org.graalvm.compiler.nodes.graphbuilderconf.InvocationPlugin;
  53 import org.graalvm.compiler.nodes.graphbuilderconf.InvocationPlugin.Receiver;
  54 import org.graalvm.compiler.nodes.spi.StampProvider;
  55 import org.graalvm.compiler.options.OptionValues;
  56 
  57 import jdk.vm.ci.code.BailoutException;
  58 import jdk.vm.ci.code.BytecodeFrame;
  59 import jdk.vm.ci.meta.ConstantReflectionProvider;
  60 import jdk.vm.ci.meta.JavaKind;
  61 import jdk.vm.ci.meta.JavaType;
  62 import jdk.vm.ci.meta.MetaAccessProvider;
  63 import jdk.vm.ci.meta.ResolvedJavaMethod;


 147     @Override
 148     public <T extends ValueNode> T append(T v) {
 149         if (v.graph() != null) {
 150             return v;
 151         }
 152         T added = graph.addOrUniqueWithInputs(v);
 153         if (added == v) {
 154             updateLastInstruction(v);
 155         }
 156         return added;
 157     }
 158 
 159     @Override
 160     public void push(JavaKind kind, ValueNode value) {
 161         assert kind != JavaKind.Void;
 162         assert returnValue == null;
 163         returnValue = value;
 164     }
 165 
 166     @Override
 167     public Invoke handleReplacedInvoke(InvokeKind invokeKind, ResolvedJavaMethod targetMethod, ValueNode[] args, boolean forceInlineEverything) {
 168         throw GraalError.shouldNotReachHere();
 169     }
 170 
 171     @Override
 172     public void handleReplacedInvoke(CallTargetNode callTarget, JavaKind resultType) {
 173         throw GraalError.shouldNotReachHere();
 174     }
 175 
 176     @Override
 177     public StampProvider getStampProvider() {
 178         return stampProvider;
 179     }
 180 
 181     @Override
 182     public MetaAccessProvider getMetaAccess() {
 183         return metaAccess;
 184     }
 185 
 186     @Override
 187     public ConstantReflectionProvider getConstantReflection() {


< prev index next >