diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2014-07-15 12:55:21 +0100 |
---|---|---|
committer | Nicolas Geoffray <ngeoffray@google.com> | 2014-07-15 12:58:29 +0100 |
commit | ab032bc1ff57831106fdac6a91a136293609401f (patch) | |
tree | 5891daefe635283443a255a811ab6a3f3b8a62cd /test/401-optimizing-compiler/src | |
parent | 635561b86ac03f5562bdb779baa6db12f31b3cae (diff) | |
download | art-ab032bc1ff57831106fdac6a91a136293609401f.tar.gz art-ab032bc1ff57831106fdac6a91a136293609401f.tar.bz2 art-ab032bc1ff57831106fdac6a91a136293609401f.zip |
Fix a braino in the stack layout.
Also do some refactoring to have this code be just in CodeGenerator.
Change-Id: I88de109889138af8d60027973c12a64bee813cb7
Diffstat (limited to 'test/401-optimizing-compiler/src')
-rw-r--r-- | test/401-optimizing-compiler/src/Main.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/401-optimizing-compiler/src/Main.java b/test/401-optimizing-compiler/src/Main.java index e5706a52fe..a5192e1e64 100644 --- a/test/401-optimizing-compiler/src/Main.java +++ b/test/401-optimizing-compiler/src/Main.java @@ -71,6 +71,10 @@ public class Main { if (m.$opt$TestOtherParameter(new Main()) == m) { throw new Error("Unexpected value returned"); } + + if (m.$opt$TestReturnNewObject(m) == m) { + throw new Error("Unexpected value returned"); + } } static int $opt$TestInvokeIntParameter(int param) { @@ -108,6 +112,12 @@ public class Main { return other; } + Object $opt$TestReturnNewObject(Object other) { + Object o = new Object(); + forceGCStaticMethod(); + return o; + } + public static void $opt$TestInvokeStatic() { printStaticMethod(); printStaticMethodWith2Args(1, 2); |