Skip to content

Commit 2a406f3

Browse files
marschallVladimir Kozlov
authored andcommitted
8138732: Rename @HotSpotIntrinsicCandidate to @IntrinsicCandidate and move it to the jdk.internal.vm.annotation package
Reviewed-by: dholmes, alanb, psandoz, kvn, egahlin
1 parent 4b16f8a commit 2a406f3

File tree

64 files changed

+488
-488
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+488
-488
lines changed

make/data/characterdata/CharacterDataLatin1.java.template

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
package java.lang;
2727

28-
import jdk.internal.HotSpotIntrinsicCandidate;
28+
import jdk.internal.vm.annotation.IntrinsicCandidate;
2929

3030
/** The CharacterData class encapsulates the large tables found in
3131
Java.lang.Character. */
@@ -80,18 +80,18 @@ class CharacterDataLatin1 extends CharacterData {
8080
return props;
8181
}
8282

83-
@HotSpotIntrinsicCandidate
83+
@IntrinsicCandidate
8484
boolean isDigit(int ch) {
8585
return '0' <= ch && ch <= '9';
8686
}
8787

88-
@HotSpotIntrinsicCandidate
88+
@IntrinsicCandidate
8989
boolean isLowerCase(int ch) {
9090
int props = getProperties(ch);
9191
return (props & $$maskType) == Character.LOWERCASE_LETTER;
9292
}
9393

94-
@HotSpotIntrinsicCandidate
94+
@IntrinsicCandidate
9595
boolean isUpperCase(int ch) {
9696
int props = getProperties(ch);
9797
return (props & $$maskType) == Character.UPPERCASE_LETTER;
@@ -232,7 +232,7 @@ class CharacterDataLatin1 extends CharacterData {
232232
return retval;
233233
}
234234

235-
@HotSpotIntrinsicCandidate
235+
@IntrinsicCandidate
236236
boolean isWhitespace(int ch) {
237237
int props = getProperties(ch);
238238
return ((props & $$maskIdentifierInfo) == $$valueJavaWhitespace);

src/hotspot/cpu/x86/c2_MacroAssembler_x86.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2258,7 +2258,7 @@ void C2_MacroAssembler::string_compare(Register str1, Register str2,
22582258
// Search for Non-ASCII character (Negative byte value) in a byte array,
22592259
// return true if it has any and false otherwise.
22602260
// ..\jdk\src\java.base\share\classes\java\lang\StringCoding.java
2261-
// @HotSpotIntrinsicCandidate
2261+
// @IntrinsicCandidate
22622262
// private static boolean hasNegatives(byte[] ba, int off, int len) {
22632263
// for (int i = off; i < off + len; i++) {
22642264
// if (ba[i] < 0) {

src/hotspot/cpu/x86/macroAssembler_x86.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5133,7 +5133,7 @@ void MacroAssembler::generate_fill(BasicType t, bool aligned,
51335133
}
51345134

51355135
// encode char[] to byte[] in ISO_8859_1
5136-
//@HotSpotIntrinsicCandidate
5136+
//@IntrinsicCandidate
51375137
//private static int implEncodeISOArray(byte[] sa, int sp,
51385138
//byte[] da, int dp, int len) {
51395139
// int i = 0;
@@ -7510,7 +7510,7 @@ void MacroAssembler::crc32c_ipl_alg2_alt2(Register in_out, Register in1, Registe
75107510

75117511
// Compress char[] array to byte[].
75127512
// ..\jdk\src\java.base\share\classes\java\lang\StringUTF16.java
7513-
// @HotSpotIntrinsicCandidate
7513+
// @IntrinsicCandidate
75147514
// private static int compress(char[] src, int srcOff, byte[] dst, int dstOff, int len) {
75157515
// for (int i = 0; i < len; i++) {
75167516
// int c = src[srcOff++];
@@ -7726,7 +7726,7 @@ void MacroAssembler::char_array_compress(Register src, Register dst, Register le
77267726

77277727
// Inflate byte[] array to char[].
77287728
// ..\jdk\src\java.base\share\classes\java\lang\StringLatin1.java
7729-
// @HotSpotIntrinsicCandidate
7729+
// @IntrinsicCandidate
77307730
// private static void inflate(byte[] src, int srcOff, char[] dst, int dstOff, int len) {
77317731
// for (int i = 0; i < len; i++) {
77327732
// dst[dstOff++] = (char)(src[srcOff++] & 0xff);

src/hotspot/share/classfile/classFileParser.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1079,7 +1079,7 @@ class AnnotationCollector : public ResourceObj{
10791079
_method_InjectedProfile,
10801080
_method_LambdaForm_Compiled,
10811081
_method_Hidden,
1082-
_method_HotSpotIntrinsicCandidate,
1082+
_method_IntrinsicCandidate,
10831083
_jdk_internal_vm_annotation_Contended,
10841084
_field_Stable,
10851085
_jdk_internal_vm_annotation_ReservedStackAccess,
@@ -2102,10 +2102,10 @@ AnnotationCollector::annotation_index(const ClassLoaderData* loader_data,
21022102
if (!privileged) break; // only allow in privileged code
21032103
return _method_Hidden;
21042104
}
2105-
case vmSymbols::VM_SYMBOL_ENUM_NAME(jdk_internal_HotSpotIntrinsicCandidate_signature): {
2105+
case vmSymbols::VM_SYMBOL_ENUM_NAME(jdk_internal_vm_annotation_IntrinsicCandidate_signature): {
21062106
if (_location != _in_method) break; // only allow for methods
21072107
if (!privileged) break; // only allow in privileged code
2108-
return _method_HotSpotIntrinsicCandidate;
2108+
return _method_IntrinsicCandidate;
21092109
}
21102110
case vmSymbols::VM_SYMBOL_ENUM_NAME(jdk_internal_vm_annotation_Stable_signature): {
21112111
if (_location != _in_field) break; // only allow for fields
@@ -2159,7 +2159,7 @@ void MethodAnnotationCollector::apply_to(const methodHandle& m) {
21592159
m->set_intrinsic_id(vmIntrinsics::_compiledLambdaForm);
21602160
if (has_annotation(_method_Hidden))
21612161
m->set_hidden(true);
2162-
if (has_annotation(_method_HotSpotIntrinsicCandidate) && !m->is_synthetic())
2162+
if (has_annotation(_method_IntrinsicCandidate) && !m->is_synthetic())
21632163
m->set_intrinsic_candidate(true);
21642164
if (has_annotation(_jdk_internal_vm_annotation_ReservedStackAccess))
21652165
m->set_has_reserved_stack_access(true);
@@ -5165,22 +5165,22 @@ static void check_methods_for_intrinsics(const InstanceKlass* ik,
51655165

51665166
if (CheckIntrinsics) {
51675167
// Check if an intrinsic is defined for method 'method',
5168-
// but the method is not annotated with @HotSpotIntrinsicCandidate.
5168+
// but the method is not annotated with @IntrinsicCandidate.
51695169
if (method->intrinsic_id() != vmIntrinsics::_none &&
51705170
!method->intrinsic_candidate()) {
51715171
tty->print("Compiler intrinsic is defined for method [%s], "
5172-
"but the method is not annotated with @HotSpotIntrinsicCandidate.%s",
5172+
"but the method is not annotated with @IntrinsicCandidate.%s",
51735173
method->name_and_sig_as_C_string(),
51745174
NOT_DEBUG(" Method will not be inlined.") DEBUG_ONLY(" Exiting.")
51755175
);
51765176
tty->cr();
51775177
DEBUG_ONLY(vm_exit(1));
51785178
}
5179-
// Check is the method 'method' is annotated with @HotSpotIntrinsicCandidate,
5179+
// Check is the method 'method' is annotated with @IntrinsicCandidate,
51805180
// but there is no intrinsic available for it.
51815181
if (method->intrinsic_candidate() &&
51825182
method->intrinsic_id() == vmIntrinsics::_none) {
5183-
tty->print("Method [%s] is annotated with @HotSpotIntrinsicCandidate, "
5183+
tty->print("Method [%s] is annotated with @IntrinsicCandidate, "
51845184
"but no compiler intrinsic is defined for the method.%s",
51855185
method->name_and_sig_as_C_string(),
51865186
NOT_DEBUG("") DEBUG_ONLY(" Exiting.")

src/hotspot/share/classfile/vmIntrinsics.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
// in the (Java) source code and the semantics of the method as defined
7777
// by the code in the VM, intrinsic methods must be explicitly marked.
7878
//
79-
// Intrinsic methods are marked by the jdk.internal.HotSpotIntrinsicCandidate
79+
// Intrinsic methods are marked by the jdk.internal.vm.annotation.IntrinsicCandidate
8080
// annotation. If CheckIntrinsics is enabled, the VM performs the following
8181
// checks when a class C is loaded: (1) all intrinsics defined by the VM for
8282
// class C are present in the loaded class file and are marked;

src/hotspot/share/classfile/vmSymbols.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,10 +284,10 @@
284284
template(type_annotations_name, "typeAnnotations") \
285285
\
286286
/* Intrinsic Annotation (JDK 9 and above) */ \
287-
template(jdk_internal_HotSpotIntrinsicCandidate_signature, "Ljdk/internal/HotSpotIntrinsicCandidate;") \
288287
template(jdk_internal_vm_annotation_DontInline_signature, "Ljdk/internal/vm/annotation/DontInline;") \
289288
template(jdk_internal_vm_annotation_ForceInline_signature, "Ljdk/internal/vm/annotation/ForceInline;") \
290289
template(jdk_internal_vm_annotation_Hidden_signature, "Ljdk/internal/vm/annotation/Hidden;") \
290+
template(jdk_internal_vm_annotation_IntrinsicCandidate_signature, "Ljdk/internal/vm/annotation/IntrinsicCandidate;") \
291291
template(jdk_internal_vm_annotation_Stable_signature, "Ljdk/internal/vm/annotation/Stable;") \
292292
\
293293
/* Support for JSR 292 & invokedynamic (JDK 1.7 and above) */ \

src/hotspot/share/runtime/globals.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2421,10 +2421,10 @@ const intx ObjectAlignmentInBytes = 8;
24212421
"When a class C is loaded, check that " \
24222422
"(1) all intrinsics defined by the VM for class C are present "\
24232423
"in the loaded class file and are marked with the " \
2424-
"@HotSpotIntrinsicCandidate annotation, that " \
2424+
"@IntrinsicCandidate annotation, that " \
24252425
"(2) there is an intrinsic registered for all loaded methods " \
2426-
"that are annotated with the @HotSpotIntrinsicCandidate " \
2427-
"annotation, and that " \
2426+
"that are annotated with the @IntrinsicCandidate annotation, " \
2427+
"and that " \
24282428
"(3) no orphan methods exist for class C (i.e., methods for " \
24292429
"which the VM declares an intrinsic but that are not declared "\
24302430
"in the loaded class C. " \

src/java.base/share/classes/com/sun/crypto/provider/AESCrypt.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2002, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -40,7 +40,7 @@
4040
import java.security.MessageDigest;
4141
import java.util.Arrays;
4242

43-
import jdk.internal.HotSpotIntrinsicCandidate;
43+
import jdk.internal.vm.annotation.IntrinsicCandidate;
4444

4545
/**
4646
* Rijndael --pronounced Reindaal-- is a symmetric cipher with a 128-bit
@@ -356,7 +356,7 @@ void encryptBlock(byte[] in, int inOffset,
356356
}
357357

358358
// Encryption operation. Possibly replaced with a compiler intrinsic.
359-
@HotSpotIntrinsicCandidate
359+
@IntrinsicCandidate
360360
private void implEncryptBlock(byte[] in, int inOffset,
361361
byte[] out, int outOffset)
362362
{
@@ -435,7 +435,7 @@ void decryptBlock(byte[] in, int inOffset,
435435
}
436436

437437
// Decrypt operation. Possibly replaced with a compiler intrinsic.
438-
@HotSpotIntrinsicCandidate
438+
@IntrinsicCandidate
439439
private void implDecryptBlock(byte[] in, int inOffset,
440440
byte[] out, int outOffset)
441441
{

src/java.base/share/classes/com/sun/crypto/provider/CipherBlockChaining.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -29,7 +29,7 @@
2929
import java.security.ProviderException;
3030
import java.util.Objects;
3131

32-
import jdk.internal.HotSpotIntrinsicCandidate;
32+
import jdk.internal.vm.annotation.IntrinsicCandidate;
3333
import sun.security.util.ArrayUtil;
3434

3535

@@ -153,7 +153,7 @@ int encrypt(byte[] plain, int plainOffset, int plainLen,
153153
cipher, cipherOffset);
154154
}
155155

156-
@HotSpotIntrinsicCandidate
156+
@IntrinsicCandidate
157157
private int implEncrypt(byte[] plain, int plainOffset, int plainLen,
158158
byte[] cipher, int cipherOffset)
159159
{
@@ -203,7 +203,7 @@ int decrypt(byte[] cipher, int cipherOffset, int cipherLen,
203203
return implDecrypt(cipher, cipherOffset, cipherLen, plain, plainOffset);
204204
}
205205

206-
@HotSpotIntrinsicCandidate
206+
@IntrinsicCandidate
207207
private int implDecrypt(byte[] cipher, int cipherOffset, int cipherLen,
208208
byte[] plain, int plainOffset)
209209
{

src/java.base/share/classes/com/sun/crypto/provider/CounterMode.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2002, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -27,7 +27,7 @@
2727

2828
import java.security.InvalidKeyException;
2929

30-
import jdk.internal.HotSpotIntrinsicCandidate;
30+
import jdk.internal.vm.annotation.IntrinsicCandidate;
3131
import sun.security.util.ArrayUtil;
3232

3333
/**
@@ -182,7 +182,7 @@ private int crypt(byte[] in, int inOff, int len, byte[] out, int outOff) {
182182
}
183183

184184
// Implementation of crpyt() method. Possibly replaced with a compiler intrinsic.
185-
@HotSpotIntrinsicCandidate
185+
@IntrinsicCandidate
186186
private int implCrypt(byte[] in, int inOff, int len, byte[] out, int outOff) {
187187
int result = len;
188188
while (len-- > 0) {

0 commit comments

Comments
 (0)