src/java.base/share/classes/java/lang/Character.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File 8076112 Cdiff src/java.base/share/classes/java/lang/Character.java

src/java.base/share/classes/java/lang/Character.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

*** 28,37 **** --- 28,39 ---- import java.util.Arrays; import java.util.Map; import java.util.HashMap; import java.util.Locale; + import jdk.internal.HotSpotIntrinsicCandidate; + /** * The {@code Character} class wraps a value of the primitive * type {@code char} in an object. An object of type * {@code Character} contains a single field whose type is * {@code char}.
*** 4567,4576 **** --- 4569,4579 ---- * * @param c a char value. * @return a <tt>Character</tt> instance representing <tt>c</tt>. * @since 1.5 */ + @HotSpotIntrinsicCandidate public static Character valueOf(char c) { if (c <= 127) { // must cache return CharacterCache.cache[(int)c]; } return new Character(c);
*** 4579,4588 **** --- 4582,4592 ---- /** * Returns the value of this {@code Character} object. * @return the primitive {@code char} value represented by * this object. */ + @HotSpotIntrinsicCandidate public char charValue() { return value; } /**
*** 7179,7188 **** --- 7183,7193 ---- * @param ch The {@code char} of which to reverse the byte order. * @return the value obtained by reversing (or, equivalently, swapping) * the bytes in the specified <tt>char</tt> value. * @since 1.5 */ + @HotSpotIntrinsicCandidate public static char reverseBytes(char ch) { return (char) (((ch & 0xFF00) >> 8) | (ch << 8)); } /**
src/java.base/share/classes/java/lang/Character.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File