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 | |
parent | 635561b86ac03f5562bdb779baa6db12f31b3cae (diff) | |
download | art-ab032bc1ff57831106fdac6a91a136293609401f.zip art-ab032bc1ff57831106fdac6a91a136293609401f.tar.gz art-ab032bc1ff57831106fdac6a91a136293609401f.tar.bz2 |
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')
-rw-r--r-- | test/401-optimizing-compiler/expected.txt | 1 | ||||
-rw-r--r-- | test/401-optimizing-compiler/src/Main.java | 10 |
2 files changed, 11 insertions, 0 deletions
diff --git a/test/401-optimizing-compiler/expected.txt b/test/401-optimizing-compiler/expected.txt index 97492a4..d6ef64b 100644 --- a/test/401-optimizing-compiler/expected.txt +++ b/test/401-optimizing-compiler/expected.txt @@ -11,3 +11,4 @@ Forced GC Forced GC Forced GC Forced GC +Forced GC diff --git a/test/401-optimizing-compiler/src/Main.java b/test/401-optimizing-compiler/src/Main.java index e5706a5..a5192e1 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); |