From 71fb52fee246b7d511f520febbd73dc7a9bbca79 Mon Sep 17 00:00:00 2001 From: Andreas Gampe Date: Mon, 29 Dec 2014 17:43:08 -0800 Subject: ART: Optimizing compiler intrinsics Add intrinsics infrastructure to the optimizing compiler. Add almost all intrinsics supported by Quick to the x86-64 backend. Further intrinsics require more assembler support. Change-Id: I48de9b44c82886bb298d16e74e12a9506b8e8807 --- test/082-inline-execute/src/Main.java | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'test/082-inline-execute/src') diff --git a/test/082-inline-execute/src/Main.java b/test/082-inline-execute/src/Main.java index 56972ff216..862fe066ce 100644 --- a/test/082-inline-execute/src/Main.java +++ b/test/082-inline-execute/src/Main.java @@ -119,6 +119,9 @@ public class Main { } } + // Break up the charAt tests. The optimizing compiler doesn't optimize methods with try-catch yet, + // so we need to separate out the tests that are expected to throw exception + public static void test_String_charAt() { String testStr = "Now is the time"; @@ -127,6 +130,12 @@ public class Main { Assert.assertEquals(' ', testStr.charAt(10)); Assert.assertEquals('e', testStr.charAt(testStr.length()-1)); + test_String_charAtExc(); + test_String_charAtExc2(); + } + + private static void test_String_charAtExc() { + String testStr = "Now is the time"; try { testStr.charAt(-1); Assert.fail(); @@ -146,6 +155,19 @@ public class Main { } } + private static void test_String_charAtExc2() { + try { + test_String_charAtExc3(); + Assert.fail(); + } catch (StringIndexOutOfBoundsException expected) { + } + } + + private static void test_String_charAtExc3() { + String testStr = "Now is the time"; + Assert.assertEquals('N', testStr.charAt(-1)); + } + static int start; private static int[] negIndex = { -100000 }; public static void test_String_indexOf() { -- cgit v1.2.3-59-g8ed1b