Skip to content

Commit

Permalink
make callgraph faster by deciding some stuff earlier
Browse files Browse the repository at this point in the history
  • Loading branch information
dkarv committed Jan 28, 2018
1 parent 97ca006 commit 047a97e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion examples/falo.ini
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ writeTo: DOT,TRACE,COVERAGE,DD_DOT,LINES,COMBINED_DOT

format: {class}#{line}

fastDD: true
fast: true
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public class FieldTracer extends ExprEditor {
private static final Pattern IGNORE_VAL = Pattern.compile("^val\\$[a-zA-Z_$][a-zA-Z_$0-9]*$");

private static final String TARGET =
Config.getInst().fastDD() ? FastFieldAccessRecorder.class.getCanonicalName() :
Config.getInst().fast() ? FastFieldAccessRecorder.class.getCanonicalName() :
FieldAccessRecorder.class.getCanonicalName();

public final void edit(FieldAccess f) throws CannotCompileException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ String checkStartCondition(StackItem method) {
}

public void called(StackItem method) throws IOException {
//reads.push(0);
reads.push(0);
if (calls.isEmpty()) {
// First node
String identifier = checkStartCondition(method);
Expand Down Expand Up @@ -146,9 +146,9 @@ public void returned(StackItem method) throws IOException {
}

public void dataEdge(StackItem from, StackItem to) throws IOException {
//if (!reads.isEmpty()) {
// reads.push(reads.pop() + 1);
//}
if (!reads.isEmpty()) {
reads.push(reads.pop() + 1);
}
if (calls.isEmpty()) {
LOG.info("Ignore dd egde {} -> {}", from, to);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ static void reset() {
private String format = "{class}::{method}#{line}";

@Option
private boolean fastDD = false;
private boolean fast = false;

private boolean dataDependency = false;

Expand Down Expand Up @@ -148,7 +148,7 @@ public String format() {
return format;
}

public boolean fastDD() {
return fastDD;
public boolean fast() {
return fast;
}
}

0 comments on commit 047a97e

Please sign in to comment.