Commit 119a3acd authored by Yudi Zheng's avatar Yudi Zheng

Revert the weaving region to default one.

parent d28501bb
......@@ -10,10 +10,9 @@ import org.objectweb.asm.tree.InsnList;
import org.objectweb.asm.tree.MethodNode;
import ch.usi.dag.disl.exception.MarkerException;
import ch.usi.dag.disl.snippet.Shadow.WeavingRegion;
import ch.usi.dag.disl.util.AsmOpcodes;
public class BytecodeMarker extends AbstractMarker {
public class BytecodeMarker extends AbstractDWRMarker {
protected static final String INSTR_DELIM = ",";
......@@ -50,7 +49,7 @@ public class BytecodeMarker extends AbstractMarker {
}
@Override
public List<MarkedRegion> mark(MethodNode method) {
public List<MarkedRegion> markWithDefaultWeavingReg(MethodNode method) {
List<MarkedRegion> regions = new LinkedList<MarkedRegion>();
InsnList ilst = method.instructions;
......@@ -59,10 +58,7 @@ public class BytecodeMarker extends AbstractMarker {
if (searchedInstrNums.contains(instruction.getOpcode())) {
MarkedRegion region = new MarkedRegion(instruction, instruction);
region.setWeavingRegion(new WeavingRegion(instruction, null,
instruction, instruction));
regions.add(region);
regions.add(new MarkedRegion(instruction, instruction));
}
}
......
......@@ -7,13 +7,12 @@ import org.objectweb.asm.tree.AbstractInsnNode;
import org.objectweb.asm.tree.MethodNode;
import org.objectweb.asm.tree.TryCatchBlockNode;
import ch.usi.dag.disl.snippet.Shadow.WeavingRegion;
import ch.usi.dag.disl.util.AsmHelper;
public class TryClauseMarker extends AbstractMarker {
public class TryClauseMarker extends AbstractDWRMarker {
@Override
public List<MarkedRegion> mark(MethodNode method) {
public List<MarkedRegion> markWithDefaultWeavingReg(MethodNode method) {
List<MarkedRegion> regions = new LinkedList<MarkedRegion>();
......@@ -21,13 +20,7 @@ public class TryClauseMarker extends AbstractMarker {
AbstractInsnNode start = AsmHelper.skipVirualInsns(tcb.start, true);
AbstractInsnNode end = AsmHelper.skipVirualInsns(tcb.end, false);
MarkedRegion region = new MarkedRegion(start, end);
region.setWeavingRegion(new WeavingRegion(start,
new LinkedList<AbstractInsnNode>(region.getEnds()), start,
end));
regions.add(region);
regions.add(new MarkedRegion(start, end));
}
return regions;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment