diff options
| author | Nicolas Geoffray <ngeoffray@google.com> | 2014-04-03 18:49:58 +0100 |
|---|---|---|
| committer | Nicolas Geoffray <ngeoffray@google.com> | 2014-04-04 09:59:06 +0100 |
| commit | 2e7038ac5848468740d6a419434d3dde8c585a53 (patch) | |
| tree | 465940d5cc57b28c4f5b5ad588f6d86ee72097ed /test | |
| parent | a7b2826fa469c626ff2c3ff26fd848c28bccc092 (diff) | |
| download | android_art-2e7038ac5848468740d6a419434d3dde8c585a53.tar.gz android_art-2e7038ac5848468740d6a419434d3dde8c585a53.tar.bz2 android_art-2e7038ac5848468740d6a419434d3dde8c585a53.zip | |
Add support for new-instance and invoke-direct.
Change-Id: I2daed646904f7711972a7da15d88be7573426932
Diffstat (limited to 'test')
| -rw-r--r-- | test/401-optimizing-compiler/expected.txt | 3 | ||||
| -rw-r--r-- | test/401-optimizing-compiler/src/Main.java | 13 |
2 files changed, 16 insertions, 0 deletions
diff --git a/test/401-optimizing-compiler/expected.txt b/test/401-optimizing-compiler/expected.txt index 268da55dca..a65e544efa 100644 --- a/test/401-optimizing-compiler/expected.txt +++ b/test/401-optimizing-compiler/expected.txt @@ -4,3 +4,6 @@ In static method with 5 args 1 2 3 4 5 In static method with 7 args 1 2 3 4 5 6 7 Forced GC java.lang.Error: Error +Forced GC +In static method with object arg class java.lang.Object +Forced GC diff --git a/test/401-optimizing-compiler/src/Main.java b/test/401-optimizing-compiler/src/Main.java index 4031ff1fb8..aa08137caa 100644 --- a/test/401-optimizing-compiler/src/Main.java +++ b/test/401-optimizing-compiler/src/Main.java @@ -26,6 +26,8 @@ public class Main { error = e; } System.out.println(error); + + $opt$TestInvokeNew(); } public static void $opt$TestInvokeStatic() { @@ -37,6 +39,13 @@ public class Main { throwStaticMethod(); } + public static void $opt$TestInvokeNew() { + Object o = new Object(); + forceGCStaticMethod(); + printStaticMethodWithObjectArg(o); + forceGCStaticMethod(); + } + public static void printStaticMethod() { System.out.println("In static method"); } @@ -55,6 +64,10 @@ public class Main { + a + " " + b + " " + c + " " + d + " " + e + " " + f + " " + g); } + public static void printStaticMethodWithObjectArg(Object a) { + System.out.println("In static method with object arg " + a.getClass()); + } + public static void forceGCStaticMethod() { Runtime.getRuntime().gc(); Runtime.getRuntime().gc(); |
