Esempio n. 1
0
 /** The last {@link Instruction} for which this local is in scope. */
 public Instruction getEnd() {
   if (_end != null) return _end;
   int idx = _target.getByteIndex() + _length;
   Instruction end = getCode().getInstruction(idx);
   if (end != null && (end.prev instanceof Instruction)) {
     return (Instruction) end.prev;
   }
   return getCode().getLastInstruction();
 }
Esempio n. 2
0
 /** Set the index into the code byte array at which this local starts. */
 public void setStartPc(int startPc) {
   _target.setByteIndex(startPc);
 }
Esempio n. 3
0
 /**
  * Set the {@link Instruction} marking the beginning this local. The instruction must already be a
  * part of the method. WARNING: if this instruction is deleted, the results are undefined.
  */
 public void setStart(Instruction instruction) {
   _target.setTargetInstruction(instruction);
 }
Esempio n. 4
0
 /** Return the instruction marking the beginning of this local. */
 public Instruction getStart() {
   return _target.getTargetInstruction();
 }
Esempio n. 5
0
 /** Return the index into the code byte array at which this local starts. */
 public int getStartPc() {
   return _target.getByteIndex();
 }
Esempio n. 6
0
 public void replaceTarget(Instruction oldTarget, Instruction newTarget) {
   _target.replaceTarget(oldTarget, newTarget);
   if (getEnd() == oldTarget) setEnd(newTarget);
 }
Esempio n. 7
0
 public void updateTargets() {
   _target.updateTargets();
   _end = getEnd();
 }
Esempio n. 8
0
 /** Get the number of bytes for which this local has a value in the code byte array. */
 public int getLength() {
   if (_end != null) return _end.getByteIndex() + _end.getLength() - _target.getByteIndex();
   return _length;
 }