< prev index next >

src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/VoidStamp.java

Print this page




  26 
  27 import org.graalvm.compiler.core.common.LIRKind;
  28 import org.graalvm.compiler.core.common.spi.LIRKindTool;
  29 import org.graalvm.compiler.debug.GraalError;
  30 
  31 import jdk.vm.ci.meta.Constant;
  32 import jdk.vm.ci.meta.JavaKind;
  33 import jdk.vm.ci.meta.MemoryAccessProvider;
  34 import jdk.vm.ci.meta.MetaAccessProvider;
  35 import jdk.vm.ci.meta.ResolvedJavaType;
  36 
  37 /**
  38  * Singleton stamp representing the value of type {@code void}.
  39  */
  40 public final class VoidStamp extends Stamp {
  41 
  42     private VoidStamp() {
  43     }
  44 
  45     @Override




  46     public Stamp unrestricted() {
  47         return this;
  48     }
  49 
  50     @Override
  51     public boolean isUnrestricted() {
  52         return true;
  53     }
  54 
  55     @Override
  56     public JavaKind getStackKind() {
  57         return JavaKind.Void;
  58     }
  59 
  60     @Override
  61     public Stamp improveWith(Stamp other) {
  62         assert other instanceof VoidStamp;
  63         return this;
  64     }
  65 




  26 
  27 import org.graalvm.compiler.core.common.LIRKind;
  28 import org.graalvm.compiler.core.common.spi.LIRKindTool;
  29 import org.graalvm.compiler.debug.GraalError;
  30 
  31 import jdk.vm.ci.meta.Constant;
  32 import jdk.vm.ci.meta.JavaKind;
  33 import jdk.vm.ci.meta.MemoryAccessProvider;
  34 import jdk.vm.ci.meta.MetaAccessProvider;
  35 import jdk.vm.ci.meta.ResolvedJavaType;
  36 
  37 /**
  38  * Singleton stamp representing the value of type {@code void}.
  39  */
  40 public final class VoidStamp extends Stamp {
  41 
  42     private VoidStamp() {
  43     }
  44 
  45     @Override
  46     public void accept(Visitor v) {
  47     }
  48 
  49     @Override
  50     public Stamp unrestricted() {
  51         return this;
  52     }
  53 
  54     @Override
  55     public boolean isUnrestricted() {
  56         return true;
  57     }
  58 
  59     @Override
  60     public JavaKind getStackKind() {
  61         return JavaKind.Void;
  62     }
  63 
  64     @Override
  65     public Stamp improveWith(Stamp other) {
  66         assert other instanceof VoidStamp;
  67         return this;
  68     }
  69 


< prev index next >