версия под джсон. в графе циклов временно закоммичена старая распаковка
This commit is contained in:
@@ -6,21 +6,24 @@ import _VisualDVM.ProjectData.Messages.Message;
|
||||
import _VisualDVM.ProjectData.SapforData.FileObjectWithMessages;
|
||||
import _VisualDVM.ProjectData.SapforData.Functions.FuncCall;
|
||||
import com.google.gson.annotations.Expose;
|
||||
import com.sun.org.glassfish.gmbal.Description;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Vector;
|
||||
public class Loop extends FileObjectWithMessages {
|
||||
//public String file = "";
|
||||
//public int line = 1;
|
||||
@Expose
|
||||
private final int lineNumAfterLoop;
|
||||
@Expose
|
||||
private final int perfectLoop;
|
||||
@Expose
|
||||
private final boolean hasOutGoto;
|
||||
private final int hasOutGoto;
|
||||
@Expose
|
||||
private final boolean hasPrints;
|
||||
private final int hasPrints;
|
||||
@Expose
|
||||
private final boolean hasNonRectIters;
|
||||
//
|
||||
private final int hasNonRectIters;
|
||||
@Expose
|
||||
private final int childCount;
|
||||
@Expose
|
||||
@@ -52,6 +55,7 @@ public class Loop extends FileObjectWithMessages {
|
||||
children.addAll(loops);
|
||||
return children;
|
||||
}
|
||||
|
||||
public Loop(String[] packedLoopInfo, Index idx, DBProjectFile father_in) {
|
||||
file = father_in.name;
|
||||
int calls = Integer.parseInt(packedLoopInfo[idx.Inc()]);//+
|
||||
@@ -63,8 +67,8 @@ public class Loop extends FileObjectWithMessages {
|
||||
line = Integer.parseInt(packedLoopInfo[idx.Inc()]);
|
||||
lineNumAfterLoop = Integer.parseInt(packedLoopInfo[idx.Inc()]);
|
||||
perfectLoop = Integer.parseInt(packedLoopInfo[idx.Inc()]);
|
||||
hasOutGoto = (Integer.parseInt(packedLoopInfo[idx.Inc()]) == 1);
|
||||
hasPrints = (Integer.parseInt(packedLoopInfo[idx.Inc()]) == 1);
|
||||
hasOutGoto = Integer.parseInt(packedLoopInfo[idx.Inc()]);
|
||||
hasPrints = Integer.parseInt(packedLoopInfo[idx.Inc()]);
|
||||
childCount = Integer.parseInt(packedLoopInfo[idx.Inc()]);
|
||||
int state = Integer.parseInt(packedLoopInfo[idx.Inc()]);
|
||||
switch (state) {
|
||||
@@ -78,8 +82,8 @@ public class Loop extends FileObjectWithMessages {
|
||||
loopState = LoopState.Loop;
|
||||
break;
|
||||
}
|
||||
hasNonRectIters = (Integer.parseInt(packedLoopInfo[idx.Inc()]) == 1); //+
|
||||
if (hasNonRectIters)
|
||||
hasNonRectIters = Integer.parseInt(packedLoopInfo[idx.Inc()]); //+
|
||||
if (hasNonRectIters==1)
|
||||
non_rect_iters.add(new NonRectIter(father_in, line));
|
||||
////-------------------------------------------------------------------------------
|
||||
// число внешних переходов
|
||||
@@ -135,4 +139,9 @@ public class Loop extends FileObjectWithMessages {
|
||||
public VisualiserFonts getFont() {
|
||||
return loopState.getFont();
|
||||
}
|
||||
public void toMap_r(LinkedHashMap<Integer, Loop> loops_map){
|
||||
loops_map.put(line, this);
|
||||
for (Loop loop: loops)
|
||||
loop.toMap_r(loops_map);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user