Beispiel #1
0
 private static Stamp narrowingKindConvertion(IntegerStamp fromStamp, Kind toKind) {
   long mask = fromStamp.mask() & IntegerStamp.defaultMask(toKind);
   long lowerBound = saturate(fromStamp.lowerBound(), toKind);
   long upperBound = saturate(fromStamp.upperBound(), toKind);
   if (fromStamp.lowerBound() < toKind.getMinValue()) {
     upperBound = toKind.getMaxValue();
   }
   if (fromStamp.upperBound() > toKind.getMaxValue()) {
     lowerBound = toKind.getMinValue();
   }
   return StampFactory.forInteger(toKind.getStackKind(), lowerBound, upperBound, mask);
 }
Beispiel #2
0
 protected DirectReadNode(ValueNode address, Kind readKind) {
   super(StampFactory.forKind(readKind.getStackKind()));
   this.address = address;
   this.readKind = readKind;
 }