Skip to content

Commit 425f819

Browse files
author
Daniel Kroening
authored
Merge pull request #407 from smowton/java_basic_lazy_conversion
Java basic lazy method conversion
2 parents 85e7920 + 73e0479 commit 425f819

37 files changed

+997
-86
lines changed
222 Bytes
Binary file not shown.
222 Bytes
Binary file not shown.
292 Bytes
Binary file not shown.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
CORE
2+
test.class
3+
--lazy-methods --verbosity 10 --function test.main
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
elaborate java::A\.f:\(\)V
7+
--
8+
elaborate java::B\.g:\(\)V
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// The most basic lazy loading test: A::f is directly called, B::g should be unreachable
2+
3+
public class test
4+
{
5+
A a;
6+
B b;
7+
public static void main()
8+
{
9+
A.f();
10+
}
11+
}
12+
13+
class A
14+
{
15+
public static void f() {}
16+
}
17+
18+
class B
19+
{
20+
public static void g() {}
21+
}
222 Bytes
Binary file not shown.
222 Bytes
Binary file not shown.
310 Bytes
Binary file not shown.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
CORE
2+
test.class
3+
--lazy-methods --verbosity 10 --function test.main
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
elaborate java::A\.f:\(\)V
7+
--
8+
elaborate java::B\.g:\(\)V
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// This test checks that because A is instantiated in main and B is not,
2+
// A::f is reachable and B::g is not
3+
4+
public class test
5+
{
6+
A a;
7+
B b;
8+
public static void main()
9+
{
10+
A a = new A();
11+
a.f();
12+
}
13+
}
14+
15+
class A
16+
{
17+
public void f() {}
18+
}
19+
20+
class B
21+
{
22+
public void g() {}
23+
}

0 commit comments

Comments
 (0)