protected void flowThrough(Object inVal, Object stmt, Object outVal) { FlowSet in = (FlowSet) inVal; FlowSet out = (FlowSet) outVal; Stmt s = (Stmt) stmt; in.copy(out); CallGraph cg = Scene.v().getCallGraph(); Iterator edges = cg.edgesOutOf(s); while (edges.hasNext()) { Edge e = (Edge) edges.next(); if (e.isClinit()) { out.add(e.tgt()); } } }
protected Object newInitialFlow() { ArraySparseSet set = new ArraySparseSet(); CallGraph cg = Scene.v().getCallGraph(); Iterator mIt = cg.edgesOutOf(g.getBody().getMethod()); while (mIt.hasNext()) { Edge edge = (Edge) mIt.next(); if (edge.isClinit()) { set.add(edge.tgt()); } } return set; } }
if (edge.isClinit()) { clinitMethods.add(target);
protected void internalTransform(Body b, String phaseName, Map options) { ClinitElimAnalysis a = new ClinitElimAnalysis(new BriefUnitGraph(b)); CallGraph cg = Scene.v().getCallGraph(); SootMethod m = b.getMethod(); Iterator edgeIt = cg.edgesOutOf(m); while (edgeIt.hasNext()) { Edge e = (Edge) edgeIt.next(); if (e.srcStmt() == null) { continue; } if (!e.isClinit()) { continue; } FlowSet methods = (FlowSet) a.getFlowBefore(e.srcStmt()); if (methods.contains(e.tgt())) { cg.removeEdge(e); } } } }
while (edgeList.hasNext()) { Edge edge = edgeList.next(); if (edge.isClinit()) { continue;
protected void flowThrough(Object inVal, Object stmt, Object outVal) { FlowSet in = (FlowSet) inVal; FlowSet out = (FlowSet) outVal; Stmt s = (Stmt) stmt; in.copy(out); CallGraph cg = Scene.v().getCallGraph(); Iterator edges = cg.edgesOutOf(s); while (edges.hasNext()){ Edge e = (Edge)edges.next(); if (e.isClinit()) { out.add(e.tgt()); } } }
protected void flowThrough(Object inVal, Object stmt, Object outVal) { FlowSet in = (FlowSet) inVal; FlowSet out = (FlowSet) outVal; Stmt s = (Stmt) stmt; in.copy(out); CallGraph cg = Scene.v().getCallGraph(); Iterator edges = cg.edgesOutOf(s); while (edges.hasNext()){ Edge e = (Edge)edges.next(); if (e.isClinit()) { out.add(e.tgt()); } } }
protected Object newInitialFlow(){ ArraySparseSet set = new ArraySparseSet(); CallGraph cg = Scene.v().getCallGraph(); Iterator mIt = cg.edgesOutOf(g.getBody().getMethod()); while (mIt.hasNext()){ Edge edge = (Edge)mIt.next(); if (edge.isClinit()){ set.add(edge.tgt()); } } return set; } }
protected Object newInitialFlow(){ ArraySparseSet set = new ArraySparseSet(); CallGraph cg = Scene.v().getCallGraph(); Iterator mIt = cg.edgesOutOf(g.getBody().getMethod()); while (mIt.hasNext()){ Edge edge = (Edge)mIt.next(); if (edge.isClinit()){ set.add(edge.tgt()); } } return set; } }
protected void internalTransform(Body b, String phaseName, Map options){ ClinitElimAnalysis a = new ClinitElimAnalysis( new BriefUnitGraph(b)); CallGraph cg = Scene.v().getCallGraph(); SootMethod m = b.getMethod(); Iterator edgeIt = cg.edgesOutOf(m); while (edgeIt.hasNext()){ Edge e = (Edge)edgeIt.next(); if (e.srcStmt() == null) continue; if (!e.isClinit()) continue; FlowSet methods = (FlowSet) a.getFlowBefore(e.srcStmt()); if (methods.contains(e.tgt())){ cg.removeEdge(e); } } } }
protected void internalTransform(Body b, String phaseName, Map options){ ClinitElimAnalysis a = new ClinitElimAnalysis( new BriefUnitGraph(b)); CallGraph cg = Scene.v().getCallGraph(); SootMethod m = b.getMethod(); Iterator edgeIt = cg.edgesOutOf(m); while (edgeIt.hasNext()){ Edge e = (Edge)edgeIt.next(); if (e.srcStmt() == null) continue; if (!e.isClinit()) continue; FlowSet methods = (FlowSet) a.getFlowBefore(e.srcStmt()); if (methods.contains(e.tgt())){ cg.removeEdge(e); } } } }