diff options
author | Andreas Gampe <agampe@google.com> | 2014-12-29 17:43:08 -0800 |
---|---|---|
committer | Andreas Gampe <agampe@google.com> | 2015-01-15 10:21:11 -0800 |
commit | 71fb52fee246b7d511f520febbd73dc7a9bbca79 (patch) | |
tree | 444d91e910433aaf887bbdada28dfaa3160bebc2 /test/082-inline-execute | |
parent | 420457e6040184a6e1639a4c84fcc8e237bd8a3d (diff) | |
download | art-71fb52fee246b7d511f520febbd73dc7a9bbca79.zip art-71fb52fee246b7d511f520febbd73dc7a9bbca79.tar.gz art-71fb52fee246b7d511f520febbd73dc7a9bbca79.tar.bz2 |
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
Diffstat (limited to 'test/082-inline-execute')
-rw-r--r-- | test/082-inline-execute/src/Main.java | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/082-inline-execute/src/Main.java b/test/082-inline-execute/src/Main.java index 56972ff..862fe06 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() { |