From ab032bc1ff57831106fdac6a91a136293609401f Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Tue, 15 Jul 2014 12:55:21 +0100 Subject: Fix a braino in the stack layout. Also do some refactoring to have this code be just in CodeGenerator. Change-Id: I88de109889138af8d60027973c12a64bee813cb7 --- test/401-optimizing-compiler/expected.txt | 1 + test/401-optimizing-compiler/src/Main.java | 10 ++++++++++ 2 files changed, 11 insertions(+) (limited to 'test/401-optimizing-compiler') 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); -- cgit v1.1