# HG changeset patch # User Doug Simon # Date 1355840458 -3600 # Node ID 5f21ab202edcd27da29af324228872e8ac52bbf3 # Parent a990b07c399d60da81e250449c67133b6af65132 removed @Snippet annotation from methods called by the array copy snippets made array copy snippets throw ArrayIndexOutOfBoundsException instead of IndexOutOfBoundsException to comply with the specification diff -r a990b07c399d -r 5f21ab202edc graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/snippets/ArrayCopySnippets.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/snippets/ArrayCopySnippets.java Tue Dec 18 15:19:00 2012 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/snippets/ArrayCopySnippets.java Tue Dec 18 15:20:58 2012 +0100 @@ -21,8 +21,11 @@ * questions. */ package com.oracle.graal.hotspot.snippets; +import static com.oracle.graal.api.code.DeoptimizationAction.*; +import static com.oracle.graal.api.meta.DeoptimizationReason.*; import static com.oracle.graal.hotspot.snippets.HotSpotSnippetUtils.*; +import com.oracle.graal.api.code.*; import com.oracle.graal.api.meta.*; import com.oracle.graal.hotspot.*; import com.oracle.graal.hotspot.nodes.*; @@ -42,7 +45,6 @@ private static final Kind VECTOR_KIND = Kind.Long; private static final long VECTOR_SIZE = arrayIndexScale(Kind.Long); - @Snippet public static void vectorizedCopy(Object src, int srcPos, Object dest, int destPos, int length, @ConstantParameter("baseKind") Kind baseKind) { checkInputs(src, srcPos, dest, destPos, length); int header = arrayBaseOffset(baseKind); @@ -71,13 +73,12 @@ } } - @Snippet public static void checkInputs(Object src, int srcPos, Object dest, int destPos, int length) { if (src == null || dest == null) { throw new NullPointerException(); } if (srcPos < 0 || destPos < 0 || length < 0 || srcPos + length > ArrayLengthNode.arrayLength(src) || destPos + length > ArrayLengthNode.arrayLength(dest)) { - throw new IndexOutOfBoundsException(); + throw new ArrayIndexOutOfBoundsException(); } }