summaryrefslogtreecommitdiffstats
path: root/test/401-optimizing-compiler
diff options
context:
space:
mode:
authorNicolas Geoffray <ngeoffray@google.com>2014-07-15 12:55:21 +0100
committerNicolas Geoffray <ngeoffray@google.com>2014-07-15 12:58:29 +0100
commitab032bc1ff57831106fdac6a91a136293609401f (patch)
tree5891daefe635283443a255a811ab6a3f3b8a62cd /test/401-optimizing-compiler
parent635561b86ac03f5562bdb779baa6db12f31b3cae (diff)
downloadart-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/401-optimizing-compiler')
-rw-r--r--test/401-optimizing-compiler/expected.txt1
-rw-r--r--test/401-optimizing-compiler/src/Main.java10
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);