diff options
| author | Nicolas Geoffray <ngeoffray@google.com> | 2014-04-03 10:38:37 +0100 |
|---|---|---|
| committer | Nicolas Geoffray <ngeoffray@google.com> | 2014-04-03 17:09:22 +0100 |
| commit | 4a34a428c6a2588e0857ef6baf88f1b73ce65958 (patch) | |
| tree | a9f025c17752a175c4e6a203c01e935cb438efb1 /test | |
| parent | 8549cf9d83688f7decbbea2a8de761ce29e95f3c (diff) | |
| download | android_art-4a34a428c6a2588e0857ef6baf88f1b73ce65958.tar.gz android_art-4a34a428c6a2588e0857ef6baf88f1b73ce65958.tar.bz2 android_art-4a34a428c6a2588e0857ef6baf88f1b73ce65958.zip | |
Support passing arguments to invoke-static* instructions.
- Stop using the frame pointer for accessing locals.
- Stop emulating a stack when doing code generation. Instead,
rely on dex register model, where instructions only reference
registers.
Change-Id: Id51bd7d33ac430cb87a53c9f4b0c864eeb1006f9
Diffstat (limited to 'test')
| -rw-r--r-- | test/401-optimizing-compiler/expected.txt | 3 | ||||
| -rw-r--r-- | test/401-optimizing-compiler/src/Main.java | 17 |
2 files changed, 20 insertions, 0 deletions
diff --git a/test/401-optimizing-compiler/expected.txt b/test/401-optimizing-compiler/expected.txt index 7b3a0181b1..268da55dca 100644 --- a/test/401-optimizing-compiler/expected.txt +++ b/test/401-optimizing-compiler/expected.txt @@ -1,3 +1,6 @@ In static method +In static method with 2 args 1 2 +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 diff --git a/test/401-optimizing-compiler/src/Main.java b/test/401-optimizing-compiler/src/Main.java index 2609e0f027..4031ff1fb8 100644 --- a/test/401-optimizing-compiler/src/Main.java +++ b/test/401-optimizing-compiler/src/Main.java @@ -30,6 +30,9 @@ public class Main { public static void $opt$TestInvokeStatic() { printStaticMethod(); + printStaticMethodWith2Args(1, 2); + printStaticMethodWith5Args(1, 2, 3, 4, 5); + printStaticMethodWith7Args(1, 2, 3, 4, 5, 6, 7); forceGCStaticMethod(); throwStaticMethod(); } @@ -38,6 +41,20 @@ public class Main { System.out.println("In static method"); } + public static void printStaticMethodWith2Args(int a, int b) { + System.out.println("In static method with 2 args " + a + " " + b); + } + + public static void printStaticMethodWith5Args(int a, int b, int c, int d, int e) { + System.out.println("In static method with 5 args " + + a + " " + b + " " + c + " " + d + " " + e); + } + + public static void printStaticMethodWith7Args(int a, int b, int c, int d, int e, int f, int g) { + System.out.println("In static method with 7 args " + + a + " " + b + " " + c + " " + d + " " + e + " " + f + " " + g); + } + public static void forceGCStaticMethod() { Runtime.getRuntime().gc(); Runtime.getRuntime().gc(); |
