Exemplo n.º 1
0
 /**
  * Changes the type of any object in a local variable or on the operand stack whose current type
  * is matches <code>fromType</code> to be <code>toType</code>.
  */
 public void replaceTypeWithType(Klass fromType, Klass toType) {
   for (int i = 0; i < localTypes.length; i++) {
     if (localTypes[i] == fromType) {
       localTypes[i] = toType;
     }
   }
   for (int i = 0; i < sp; i++) {
     StackProducer producer = stack[i];
     if (producer != null && producer.getType() == fromType) {
       producer.updateType(toType);
     }
   }
 }