src/java.base/share/classes/java/lang/Short.java
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
*** old/src/java.base/share/classes/java/lang/Short.java Fri Jun 26 17:30:23 2015
--- new/src/java.base/share/classes/java/lang/Short.java Fri Jun 26 17:30:23 2015
*** 23,32 ****
--- 23,34 ----
* questions.
*/
package java.lang;
+ import jdk.internal.HotSpotIntrinsicCandidate;
+
/**
* The {@code Short} class wraps a value of primitive type {@code
* short} in an object. An object of type {@code Short} contains a
* single field whose type is {@code short}.
*
*** 225,234 ****
--- 227,237 ----
*
* @param s a short value.
* @return a {@code Short} instance representing {@code s}.
* @since 1.5
*/
+ @HotSpotIntrinsicCandidate
public static Short valueOf(short s) {
final int offset = 128;
int sAsInt = s;
if (sAsInt >= -128 && sAsInt <= 127) { // must cache
return ShortCache.cache[sAsInt + offset];
*** 332,341 ****
--- 335,345 ----
/**
* Returns the value of this {@code Short} as a
* {@code short}.
*/
+ @HotSpotIntrinsicCandidate
public short shortValue() {
return value;
}
/**
*** 485,494 ****
--- 489,499 ----
* @param i the value whose bytes are to be reversed
* @return the value obtained by reversing (or, equivalently, swapping)
* the bytes in the specified {@code short} value.
* @since 1.5
*/
+ @HotSpotIntrinsicCandidate
public static short reverseBytes(short i) {
return (short) (((i & 0xFF00) >> 8) | (i << 8));
}
src/java.base/share/classes/java/lang/Short.java
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File