private void checkConsumedAndProducedValues(Instruction ins, ValueNumber[] consumedValueList, ValueNumber[] producedValueList) {
int numConsumed = ins.consumeStack(getCPG());
int numProduced = ins.produceStack(getCPG());
if (numConsumed == Constants.UNPREDICTABLE) {
throw new InvalidBytecodeException("Unpredictable stack consumption for " + ins);
}
if (numProduced == Constants.UNPREDICTABLE) {
throw new InvalidBytecodeException("Unpredictable stack production for " + ins);
}
if (consumedValueList.length != numConsumed) {
throw new IllegalStateException("Wrong number of values consumed for " + ins + ": expected " + numConsumed + ", got "
+ consumedValueList.length);