1 19 20 25 26 27 28 29 30 31 package soot.jimple.internal; 32 33 import soot.*; 34 import soot.jimple.*; 35 import soot.util.*; 36 import java.util.*; 37 38 abstract public class AbstractIntLongBinopExpr extends AbstractBinopExpr 39 { 40 public Type getType() 41 { 42 Value op1 = op1Box.getValue(); 43 Value op2 = op1Box.getValue(); 44 45 if((op1.getType().equals(IntType.v()) || 46 op1.getType().equals(ByteType.v()) || 47 op1.getType().equals(ShortType.v()) || 48 op1.getType().equals(CharType.v()) || 49 op1.getType().equals(BooleanType.v())) && 50 (op2.getType().equals(IntType.v()) || 51 op2.getType().equals(ByteType.v()) || 52 op2.getType().equals(ShortType.v()) || 53 op2.getType().equals(CharType.v()) || 54 op2.getType().equals(BooleanType.v()))) 55 return IntType.v(); 56 else if(op1.getType().equals(LongType.v()) && op2.getType().equals(LongType.v())) 57 return LongType.v(); 58 else 59 return UnknownType.v(); 60 } 61 } 62 | Popular Tags |