no message
This commit is contained in:
@@ -83,12 +83,12 @@ public class SPF_GetGraphFunctionPositions extends SilentSapforPass {
|
||||
res.add(name);
|
||||
if (depth > 0) {
|
||||
if (out) {
|
||||
for (FuncCall call : target.allFunctions.get(name).calls)
|
||||
for (FuncCall call : target.allFunctions.get(name).callsFrom)
|
||||
getNeighbors_r(res, call.funcName, depth - 1, in, true);
|
||||
}
|
||||
if (in) {
|
||||
for (FuncInfo parent : target.allFunctions.values()) {
|
||||
for (FuncCall call : parent.calls) {
|
||||
for (FuncCall call : parent.callsFrom) {
|
||||
if (call.funcName.equals(name)) {
|
||||
getNeighbors_r(res, parent.funcName, depth - 1, true, out);
|
||||
}
|
||||
@@ -102,12 +102,12 @@ public class SPF_GetGraphFunctionPositions extends SilentSapforPass {
|
||||
if (!res.contains(name)) {
|
||||
res.add(name);
|
||||
if (out) {
|
||||
for (FuncCall call : target.allFunctions.get(name).calls)
|
||||
for (FuncCall call : target.allFunctions.get(name).callsFrom)
|
||||
getNeighborsNoDepth_r(res, call.funcName, in, true);
|
||||
}
|
||||
if (in) {
|
||||
for (FuncInfo parent : target.allFunctions.values()) {
|
||||
for (FuncCall call : parent.calls) {
|
||||
for (FuncCall call : parent.callsFrom) {
|
||||
if (call.funcName.equals(name)) {
|
||||
getNeighborsNoDepth_r(res, parent.funcName, true, out);
|
||||
}
|
||||
@@ -237,7 +237,7 @@ public class SPF_GetGraphFunctionPositions extends SilentSapforPass {
|
||||
//теперь добавить ребер.
|
||||
for (String funcName : target.functionsGraph.vertexMap.keySet()) {
|
||||
FuncInfo fi = target.allFunctions.get(funcName);
|
||||
for (FuncCall fc : fi.calls) {
|
||||
for (FuncCall fc : fi.callsFrom) {
|
||||
if (target.functionsGraph.vertexMap.containsKey(fc.funcName))
|
||||
target.functionsGraph.addEdge(
|
||||
funcName,
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package _VisualDVM.Passes.All;
|
||||
import Common.Utils.Utils_;
|
||||
import Common.Visual.UI;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
@@ -48,7 +49,6 @@ public class SPF_GetGraphFunctions extends SapforAnalysis {
|
||||
@Override
|
||||
protected void unpack(String packed) throws Exception {
|
||||
LinkedHashMap<String, FuncInfo> declarated_functions = new LinkedHashMap<>();
|
||||
//--
|
||||
FunctionsJson functionsJson = Utils_.gson.fromJson(packed, FunctionsJson.class);
|
||||
for (FileFunctionsJson fileFunctionsJson : functionsJson.allFunctions) {
|
||||
fileFunctionsJson.file = Utils_.toW(fileFunctionsJson.file);
|
||||
@@ -65,7 +65,7 @@ public class SPF_GetGraphFunctions extends SapforAnalysis {
|
||||
//------
|
||||
LinkedHashMap<String, FuncInfo> special_functions = new LinkedHashMap<>();
|
||||
for (FuncInfo funcInfo : declarated_functions.values()) {
|
||||
for (FuncCall funcCall : funcInfo.calls) {
|
||||
for (FuncCall funcCall : funcInfo.callsFrom) {
|
||||
if (!declarated_functions.containsKey(funcCall.funcName) && (
|
||||
!special_functions.containsKey(funcCall.funcName)
|
||||
)) {
|
||||
|
||||
@@ -18,8 +18,8 @@ public class SPF_InlineProcedures extends SapforTransformation {
|
||||
Vector<String> Result = new Vector<>();
|
||||
for (FuncInfo fi : target.allFunctions.values()) {
|
||||
Vector<FuncCall> selected_children = new Vector<>();
|
||||
for (String calls_file : fi.own_calls.keySet()) {
|
||||
for (FuncCall call : fi.own_calls.get(calls_file)) {
|
||||
for (String calls_file : fi.ownCalls.keySet()) {
|
||||
for (FuncCall call : fi.ownCalls.get(calls_file)) {
|
||||
if (call.isSelected())
|
||||
selected_children.add(call);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user