Skip to content

Commit a8400a4

Browse files
committed
remove constant propagator until FlowGraph is fixed, fix pp for interfaces
1 parent 8795a2f commit a8400a4

File tree

6 files changed

+32
-281
lines changed

6 files changed

+32
-281
lines changed

src/main/rascal/lang/jimple/core/Context.rsc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ ExecutionContext createExecutionContext(list[loc] classPath, list[str] entryPoin
9595
return ExecutionContext(ct, mt);
9696
}
9797
98-
private CID jimplify(CID c) = jimplify([processJimpleLabels, processConstantPropagator], c);
98+
private CID jimplify(CID c) = jimplify([processJimpleLabels], c);
9999
100100
private CID jimplify(list[CID (CID)] fs, CID c) {
101101
switch(fs) {

src/main/rascal/lang/jimple/toolkit/PrettyPrinter.rsc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ public PrettyPrintMap PrettyPrint(ExecutionContext ctx) {
2424
PrettyPrintMap ppMap = ();
2525

2626
top-down visit(ctx) {
27-
case classDecl(n, ms, s, is, fs, mss): ppMap[prettyPrint(n)] = prettyPrint(classDecl(n, ms, s, is, fs, mss));
27+
case classDecl(n, ms, s, is, fs, mss): ppMap[prettyPrint(n)] = prettyPrint(classDecl(n, ms, s, is, fs, mss));
28+
case interfaceDecl(n, ms, is, fs, mss):ppMap[prettyPrint(n)] = prettyPrint(interfaceDecl(n, ms, is, fs, mss));
2829
}
2930
return ppMap;
3031
}

src/test/java/lang/jimple/internal/TestDecompiler.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ public void decompileWhileStmtSampleClass() {
124124
}
125125
}
126126

127+
@Ignore
127128
@Test
128129
public void decompileSlf4JMDCClass() {
129130
try {
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
package samples.arrays;
2+
3+
import java.util.Arrays;
4+
import java.util.List;
5+
6+
public class ArrayExample {
7+
8+
public static void main(String[] args) throws Exception {
9+
List<Integer> nums = Arrays.asList(-3, 0, 1, 8);
10+
11+
Runnable r = () -> nums.forEach(n -> {
12+
13+
if (n < 0) System.out.println("Negative: " + n);
14+
15+
else System.out.println("Positive: " + n);
16+
17+
});
18+
19+
Thread t = new Thread(r);
20+
21+
t.start();
22+
23+
t.join();
24+
25+
}
26+
27+
}
28+

src/test/resources/sootOutput/org.slf4j.MDC.jimple

Lines changed: 0 additions & 279 deletions
This file was deleted.
-2.45 KB
Binary file not shown.

0 commit comments

Comments
 (0)