diff options
author | 2014-08-13 02:11:24 +0100 | |
---|---|---|
committer | 2014-09-17 09:53:50 +0100 | |
commit | e982f0b8e809cece6f460fa2d8df25873aa69de4 (patch) | |
tree | df729d47439f7243b498dd4503a5f7aa41a4818b /test/401-optimizing-compiler/src/Main.java | |
parent | f031724abf4f215e1627ff837f87cad5d7a25165 (diff) |
Implement invoke virtual in optimizing compiler.
Also refactor 004 tests to make them work with both Quick and
Optimizing.
Change-Id: I87e275cb0ae0258fc3bb32b612140000b1d2adf8
Diffstat (limited to 'test/401-optimizing-compiler/src/Main.java')
-rw-r--r-- | test/401-optimizing-compiler/src/Main.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/401-optimizing-compiler/src/Main.java b/test/401-optimizing-compiler/src/Main.java index 2c6d1c2b60..07c407b565 100644 --- a/test/401-optimizing-compiler/src/Main.java +++ b/test/401-optimizing-compiler/src/Main.java @@ -97,6 +97,11 @@ public class Main { if (exception == null) { throw new Error("Missing NullPointerException"); } + + result = $opt$InvokeVirtualMethod(); + if (result != 42) { + throw new Error("Unexpected result: " + result); + } } public static void invokePrivate() { @@ -205,5 +210,13 @@ public class Main { m.o = new Main(); } + public static int $opt$InvokeVirtualMethod() { + return new Main().virtualMethod(); + } + + public int virtualMethod() { + return 42; + } + Object o; } |