KeepInline.java: New file.
* libjava.lang/KeepInline.java: New file. * libjava.lang/KeepInline.out: New file. From-SVN: r44540
This commit is contained in:
parent
9042f830ca
commit
868f43d886
@ -1,3 +1,8 @@
|
|||||||
|
2001-08-01 Jeff Sturm <jsturm@one-point.com>
|
||||||
|
|
||||||
|
* libjava.lang/KeepInline.java: New file.
|
||||||
|
* libjava.lang/KeepInline.out: New file.
|
||||||
|
|
||||||
2001-07-30 Jeff Sturm <jsturm@one-point.com>
|
2001-07-30 Jeff Sturm <jsturm@one-point.com>
|
||||||
|
|
||||||
* libjava.lang/SyncTest.java: New file.
|
* libjava.lang/SyncTest.java: New file.
|
||||||
|
18
libjava/testsuite/libjava.lang/KeepInline.java
Normal file
18
libjava/testsuite/libjava.lang/KeepInline.java
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
// Demonstrate that private methods can be reflected even if they are
|
||||||
|
// not referenced at compile-time (i.e. -fkeep-inline-functions works).
|
||||||
|
import java.lang.reflect.Method;
|
||||||
|
public class KeepInline {
|
||||||
|
private void example() {
|
||||||
|
System.out.println("example");
|
||||||
|
}
|
||||||
|
public static void main(String[] args) {
|
||||||
|
try {
|
||||||
|
KeepInline pr = new KeepInline();
|
||||||
|
Method[] meths = pr.getClass().getDeclaredMethods();
|
||||||
|
for (int n = 0; n < meths.length; n++)
|
||||||
|
System.out.println(meths[n]);
|
||||||
|
} catch (Throwable t) {
|
||||||
|
t.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
2
libjava/testsuite/libjava.lang/KeepInline.out
Normal file
2
libjava/testsuite/libjava.lang/KeepInline.out
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
private void KeepInline.example()
|
||||||
|
public static void KeepInline.main([Ljava.lang.String;)
|
Loading…
Reference in New Issue
Block a user