src/java.base/share/classes/java/lang/Integer.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File
*** old/src/java.base/share/classes/java/lang/Integer.java	Thu Jul  2 17:26:50 2015
--- new/src/java.base/share/classes/java/lang/Integer.java	Thu Jul  2 17:26:49 2015

*** 25,34 **** --- 25,35 ---- package java.lang; import java.lang.annotation.Native; import java.util.Objects; + import jdk.internal.HotSpotIntrinsicCandidate; /** * The {@code Integer} class wraps a value of the primitive type * {@code int} in an object. An object of type {@code Integer} * contains a single field whose type is {@code int}.
*** 393,402 **** --- 394,404 ---- * #toString(int, int)} method. * * @param i an integer to be converted. * @return a string representation of the argument in base&nbsp;10. */ + @HotSpotIntrinsicCandidate public static String toString(int i) { if (i == Integer.MIN_VALUE) return "-2147483648"; int size = (i < 0) ? stringSize(-i) + 1 : stringSize(i); char[] buf = new char[size];
*** 970,979 **** --- 972,982 ---- * * @param i an {@code int} value. * @return an {@code Integer} instance representing {@code i}. * @since 1.5 */ + @HotSpotIntrinsicCandidate public static Integer valueOf(int i) { if (i >= IntegerCache.low && i <= IntegerCache.high) return IntegerCache.cache[i + (-IntegerCache.low)]; return new Integer(i); }
*** 1033,1042 **** --- 1036,1046 ---- /** * Returns the value of this {@code Integer} as an * {@code int}. */ + @HotSpotIntrinsicCandidate public int intValue() { return value; } /**
*** 1536,1545 **** --- 1540,1550 ---- * ("leftmost") one-bit in the two's complement binary representation * of the specified {@code int} value, or 32 if the value * is equal to zero. * @since 1.5 */ + @HotSpotIntrinsicCandidate public static int numberOfLeadingZeros(int i) { // HD, Figure 5-6 if (i == 0) return 32; int n = 1;
*** 1563,1572 **** --- 1568,1578 ---- * one-bit in the two's complement binary representation of the * specified {@code int} value, or 32 if the value is equal * to zero. * @since 1.5 */ + @HotSpotIntrinsicCandidate public static int numberOfTrailingZeros(int i) { // HD, Figure 5-14 int y; if (i == 0) return 32; int n = 31;
*** 1585,1594 **** --- 1591,1601 ---- * @param i the value whose bits are to be counted * @return the number of one-bits in the two's complement binary * representation of the specified {@code int} value. * @since 1.5 */ + @HotSpotIntrinsicCandidate public static int bitCount(int i) { // HD, Figure 5-2 i = i - ((i >>> 1) & 0x55555555); i = (i & 0x33333333) + ((i >>> 2) & 0x33333333); i = (i + (i >>> 4)) & 0x0f0f0f0f;
*** 1686,1695 **** --- 1693,1703 ---- * @param i the value whose bytes are to be reversed * @return the value obtained by reversing the bytes in the specified * {@code int} value. * @since 1.5 */ + @HotSpotIntrinsicCandidate public static int reverseBytes(int i) { return ((i >>> 24) ) | ((i >> 8) & 0xFF00) | ((i << 8) & 0xFF0000) | ((i << 24));

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