From e982f0b8e809cece6f460fa2d8df25873aa69de4 Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Wed, 13 Aug 2014 02:11:24 +0100 Subject: Implement invoke virtual in optimizing compiler. Also refactor 004 tests to make them work with both Quick and Optimizing. Change-Id: I87e275cb0ae0258fc3bb32b612140000b1d2adf8 --- test/401-optimizing-compiler/src/Main.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'test/401-optimizing-compiler/src/Main.java') 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; } -- cgit v1.2.3-59-g8ed1b