You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
657 B
24 lines
657 B
26 years ago
|
package jode;
|
||
|
import sun.tools.java.Type;
|
||
|
|
||
|
/**
|
||
|
* ShiftOpcodes are special, because their second operand is an UIndex
|
||
|
*/
|
||
|
public class ShiftOperator extends BinaryOperator {
|
||
|
protected Type shiftType;
|
||
|
|
||
|
public ShiftOperator(int addr, int length, Type type, int op) {
|
||
|
super(addr,length, type, op);
|
||
|
shiftType = UnknownType.tUIndex;
|
||
|
}
|
||
|
|
||
|
public Type getOperandType(int i) {
|
||
|
return (i==0)?operandType:shiftType;
|
||
|
}
|
||
|
|
||
|
public void setOperandType(Type[] inputTypes) {
|
||
|
operandType = UnknownType.commonType(operandType, inputTypes[0]);
|
||
|
shiftType = UnknownType.commonType(shiftType, inputTypes[1]);
|
||
|
}
|
||
|
}
|