src/java.base/share/classes/java/lang/Byte.java
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
8076112 Cdiff src/java.base/share/classes/java/lang/Byte.java
src/java.base/share/classes/java/lang/Byte.java
Print this page
rev 12262 : 8076112: Add @HotSpotIntrinsicCandidate annotation to indicate methods for which Java Runtime has intrinsics
Summary: Annotate possibly intrinsified methods with @HotSpotIntrinsicCandidate. Add checks omitted by intrinsics to the library code. Add CheckIntrinsics flags to check consistency of intrinsics.
Reviewed-by: jrose, kvn, thartmann, vlivanov, abuckley, darcy, ascarpino, briangoetz, alanb, aph, dnsimon
*** 23,32 ****
--- 23,34 ----
* questions.
*/
package java.lang;
+ import jdk.internal.HotSpotIntrinsicCandidate;
+
/**
*
* The {@code Byte} class wraps a value of primitive type {@code byte}
* in an object. An object of type {@code Byte} contains a single
* field whose type is {@code byte}.
*** 96,105 ****
--- 98,108 ----
*
* @param b a byte value.
* @return a {@code Byte} instance representing {@code b}.
* @since 1.5
*/
+ @HotSpotIntrinsicCandidate
public static Byte valueOf(byte b) {
final int offset = 128;
return ByteCache.cache[(int)b + offset];
}
*** 318,327 ****
--- 321,331 ----
/**
* Returns the value of this {@code Byte} as a
* {@code byte}.
*/
+ @HotSpotIntrinsicCandidate
public byte byteValue() {
return value;
}
/**
src/java.base/share/classes/java/lang/Byte.java
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File