no message
This commit is contained in:
4
.idea/workspace.xml
generated
4
.idea/workspace.xml
generated
@@ -7,7 +7,9 @@
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="e42177c3-2328-4b27-8a01-35779b2beb99" name="Default Changelist" comment="">
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/SapforData/Loops/Loop.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/SapforData/Loops/Loop.java" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/Sapfor_F.exe" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/SPF_GetGraphLoops.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/SPF_GetGraphLoops.java" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
|
||||
BIN
Sapfor_F.exe
Normal file
BIN
Sapfor_F.exe
Normal file
Binary file not shown.
@@ -1,14 +1,11 @@
|
||||
package _VisualDVM.Passes.All;
|
||||
import Common.Utils.Index;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Passes.Sapfor.SapforAnalysis;
|
||||
import _VisualDVM.ProjectData.Files.DBProjectFile;
|
||||
import _VisualDVM.ProjectData.SapforData.Loops.Json.LoopsJson;
|
||||
import _VisualDVM.ProjectData.SapforData.Loops.Loop;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Vector;
|
||||
public class SPF_GetGraphLoops extends SapforAnalysis {
|
||||
@Override
|
||||
@@ -40,50 +37,22 @@ public class SPF_GetGraphLoops extends SapforAnalysis {
|
||||
}
|
||||
@Override
|
||||
protected void unpack(String packed) throws Exception {
|
||||
/*
|
||||
//System.out.println(Utils_.Brackets(packed));
|
||||
Vector<String> done_programs = new Vector<>();
|
||||
String[] splitedPackedGraph = packed.split("\\|");
|
||||
for (int i = 0; i < splitedPackedGraph.length; i += 2) {
|
||||
String name_ = Utils_.toW(splitedPackedGraph[i]);
|
||||
String[] packedLoopInfo = splitedPackedGraph[i + 1].split("#");
|
||||
Index idx = new Index();
|
||||
int nests_ = Integer.parseInt(packedLoopInfo[idx.Inc()]);
|
||||
DBProjectFile program = target.db.files.Data.get(name_);
|
||||
if (!done_programs.contains(name_)) {
|
||||
for (int k = 0; k < nests_; ++k) {
|
||||
Loop newLoop = new Loop(packedLoopInfo, idx, program);
|
||||
program.LoopNests.add(newLoop);
|
||||
}
|
||||
program.LoopGraphTitle = "Всего циклов: " + program.AllLoops.size();
|
||||
target.numLoops += program.AllLoops.size();
|
||||
done_programs.add(name_);
|
||||
}
|
||||
}
|
||||
target.UpdateLoopsCount();
|
||||
*/
|
||||
//--
|
||||
/*
|
||||
LoopsJson loopsJson = new LoopsJson();
|
||||
for (String pname: done_programs){
|
||||
loopsJson.values.addAll(target.db.files.get(pname).AllLoops.values());
|
||||
}
|
||||
File debug = new File(Global.TempDirectory, "loops_json.txt");
|
||||
FileUtils.writeStringToFile(debug,Utils_.gson.toJson(loopsJson));
|
||||
*/
|
||||
/*
|
||||
int allLoops=0;
|
||||
Vector<String> loops_programs = new Vector<>();
|
||||
System.out.println("packed_loops = "+Utils_.Brackets(packed));
|
||||
packed = "{\"loops\":"+new StringBuilder(packed).substring(9, packed.length()-1)+"}";
|
||||
System.out.println(packed);
|
||||
LoopsJson loopsJson = Utils_.gson.fromJson(packed, LoopsJson.class);
|
||||
for (Loop loop: loopsJson.values){
|
||||
for (Loop loop: loopsJson.loops){
|
||||
System.out.println("loop "+"file="+loop.file+" line="+loop.line);
|
||||
target.db.files.get(loop.file).LoopNests.add(loop);
|
||||
//-
|
||||
if (!loops_programs.contains(loop.file)){
|
||||
loops_programs.add(loop.file);
|
||||
}
|
||||
}
|
||||
System.out.println("======");
|
||||
//-
|
||||
/*
|
||||
for (String program_name: loops_programs){
|
||||
DBProjectFile program = target.db.files.get(program_name);
|
||||
program.saveAllLoops();
|
||||
|
||||
@@ -6,5 +6,5 @@ import java.util.List;
|
||||
import java.util.Vector;
|
||||
public class LoopsJson {
|
||||
@Expose
|
||||
public List<Loop> values = new Vector<>();
|
||||
public List<Loop> loops = new Vector<>();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user