8138732: Rename @HotSpotIntrinsicCandidate to @IntrinsicCandidate and move it to the jdk.internal.vm.annotation package

Reviewed-by: dholmes, alanb, psandoz, kvn, egahlin
This commit is contained in:
Philippe Marschall 2020-09-30 20:05:07 +00:00 committed by Vladimir Kozlov
parent 4b16f8ab94
commit 2a406f3ce5
64 changed files with 488 additions and 488 deletions

View file

@ -32,10 +32,10 @@ import java.util.function.Consumer;
import java.util.function.IntConsumer;
import java.util.stream.Stream;
import java.util.stream.StreamSupport;
import jdk.internal.HotSpotIntrinsicCandidate;
import jdk.internal.util.ArraysSupport;
import jdk.internal.vm.annotation.ForceInline;
import jdk.internal.vm.annotation.DontInline;
import jdk.internal.vm.annotation.ForceInline;
import jdk.internal.vm.annotation.IntrinsicCandidate;
import static java.lang.String.UTF16;
import static java.lang.String.LATIN1;
@ -53,7 +53,7 @@ final class StringUTF16 {
return new byte[len << 1];
}
@HotSpotIntrinsicCandidate
@IntrinsicCandidate
// intrinsic performs no bounds checks
static void putChar(byte[] val, int index, int c) {
assert index >= 0 && index < length(val) : "Trusted caller missed bounds check";
@ -62,7 +62,7 @@ final class StringUTF16 {
val[index] = (byte)(c >> LO_BYTE_SHIFT);
}
@HotSpotIntrinsicCandidate
@IntrinsicCandidate
// intrinsic performs no bounds checks
static char getChar(byte[] val, int index) {
assert index >= 0 && index < length(val) : "Trusted caller missed bounds check";
@ -147,7 +147,7 @@ final class StringUTF16 {
return dst;
}
@HotSpotIntrinsicCandidate
@IntrinsicCandidate
public static byte[] toBytes(char[] value, int off, int len) {
byte[] val = newBytesFor(len);
for (int i = 0; i < len; i++) {
@ -174,7 +174,7 @@ final class StringUTF16 {
}
// compressedCopy char[] -> byte[]
@HotSpotIntrinsicCandidate
@IntrinsicCandidate
public static int compress(char[] src, int srcOff, byte[] dst, int dstOff, int len) {
for (int i = 0; i < len; i++) {
char c = src[srcOff];
@ -190,7 +190,7 @@ final class StringUTF16 {
}
// compressedCopy byte[] -> byte[]
@HotSpotIntrinsicCandidate
@IntrinsicCandidate
public static int compress(byte[] src, int srcOff, byte[] dst, int dstOff, int len) {
// We need a range check here because 'getChar' has no checks
checkBoundsOffCount(srcOff, len, src);
@ -246,7 +246,7 @@ final class StringUTF16 {
return result;
}
@HotSpotIntrinsicCandidate
@IntrinsicCandidate
public static void getChars(byte[] value, int srcBegin, int srcEnd, char dst[], int dstBegin) {
// We need a range check here because 'getChar' has no checks
if (srcBegin < srcEnd) {
@ -266,7 +266,7 @@ final class StringUTF16 {
}
}
@HotSpotIntrinsicCandidate
@IntrinsicCandidate
public static boolean equals(byte[] value, byte[] other) {
if (value.length == other.length) {
int len = value.length >> 1;
@ -280,7 +280,7 @@ final class StringUTF16 {
return false;
}
@HotSpotIntrinsicCandidate
@IntrinsicCandidate
public static int compareTo(byte[] value, byte[] other) {
int len1 = length(value);
int len2 = length(other);
@ -309,7 +309,7 @@ final class StringUTF16 {
return len1 - len2;
}
@HotSpotIntrinsicCandidate
@IntrinsicCandidate
public static int compareToLatin1(byte[] value, byte[] other) {
return -StringLatin1.compareToUTF16(other, value);
}
@ -437,7 +437,7 @@ final class StringUTF16 {
}
}
@HotSpotIntrinsicCandidate
@IntrinsicCandidate
public static int indexOf(byte[] value, byte[] str) {
if (str.length == 0) {
return 0;
@ -448,7 +448,7 @@ final class StringUTF16 {
return indexOfUnsafe(value, length(value), str, length(str), 0);
}
@HotSpotIntrinsicCandidate
@IntrinsicCandidate
public static int indexOf(byte[] value, int valueCount, byte[] str, int strCount, int fromIndex) {
checkBoundsBeginEnd(fromIndex, valueCount, value);
checkBoundsBeginEnd(0, strCount, str);
@ -486,7 +486,7 @@ final class StringUTF16 {
/**
* Handles indexOf Latin1 substring in UTF16 string.
*/
@HotSpotIntrinsicCandidate
@IntrinsicCandidate
public static int indexOfLatin1(byte[] value, byte[] str) {
if (str.length == 0) {
return 0;
@ -497,7 +497,7 @@ final class StringUTF16 {
return indexOfLatin1Unsafe(value, length(value), str, str.length, 0);
}
@HotSpotIntrinsicCandidate
@IntrinsicCandidate
public static int indexOfLatin1(byte[] src, int srcCount, byte[] tgt, int tgtCount, int fromIndex) {
checkBoundsBeginEnd(fromIndex, srcCount, src);
String.checkBoundsBeginEnd(0, tgtCount, tgt.length);
@ -532,7 +532,7 @@ final class StringUTF16 {
return -1;
}
@HotSpotIntrinsicCandidate
@IntrinsicCandidate
private static int indexOfChar(byte[] value, int ch, int fromIndex, int max) {
checkBoundsBeginEnd(fromIndex, max, value);
return indexOfCharUnsafe(value, ch, fromIndex, max);