Lines 44-49
Link Here
|
44 |
import org.apache.bcel.generic.LocalVariableInstruction; |
44 |
import org.apache.bcel.generic.LocalVariableInstruction; |
45 |
import org.apache.bcel.generic.MethodGen; |
45 |
import org.apache.bcel.generic.MethodGen; |
46 |
import org.apache.bcel.generic.ObjectType; |
46 |
import org.apache.bcel.generic.ObjectType; |
|
|
47 |
import org.apache.bcel.generic.SWITCH; |
47 |
import org.apache.bcel.generic.Select; |
48 |
import org.apache.bcel.generic.Select; |
48 |
import org.apache.bcel.generic.Type; |
49 |
import org.apache.bcel.generic.Type; |
49 |
import org.aspectj.bridge.IMessage; |
50 |
import org.aspectj.bridge.IMessage; |
Lines 728-735
Link Here
|
728 |
continue; |
729 |
continue; |
729 |
} |
730 |
} |
730 |
Instruction i = ih.getInstruction(); |
731 |
Instruction i = ih.getInstruction(); |
731 |
Instruction c = i.copy(); // Use clone for shallow copy |
732 |
Instruction c = null; |
732 |
|
733 |
|
|
|
734 |
if (i instanceof Select) { |
735 |
Select freshSelect = (Select)i; |
736 |
|
737 |
// Create a new targets array that looks just like the existing one |
738 |
InstructionHandle[] targets = new InstructionHandle[freshSelect.getTargets().length]; |
739 |
for (int ii = 0; ii < targets.length; ii++) { |
740 |
targets[ii] = freshSelect.getTargets()[ii]; |
741 |
} |
742 |
|
743 |
// Create a new select statement with the new targets array |
744 |
SWITCH switchStatement = new SWITCH(freshSelect.getMatchs(),targets,freshSelect.getTarget()); |
745 |
c = (Select)switchStatement.getInstruction(); |
746 |
} else { |
747 |
c = i.copy(); // Use clone for shallow copy... |
748 |
} |
749 |
|
750 |
|
733 |
if (c instanceof BranchInstruction) |
751 |
if (c instanceof BranchInstruction) |
734 |
map.put(ih, fresh.append((BranchInstruction) c)); |
752 |
map.put(ih, fresh.append((BranchInstruction) c)); |
735 |
else |
753 |
else |