src/java.base/share/classes/java/nio/Buffer.java
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
8076112 Cdiff src/java.base/share/classes/java/nio/Buffer.java
src/java.base/share/classes/java/nio/Buffer.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
*** 24,33 ****
--- 24,34 ----
*/
package java.nio;
import java.util.Spliterator;
+ import jdk.internal.HotSpotIntrinsicCandidate;
/**
* A container for data of a specific primitive type.
*
* <p> A buffer is a linear, finite sequence of elements of a specific
*** 533,542 ****
--- 534,544 ----
/**
* Checks the given index against the limit, throwing an {@link
* IndexOutOfBoundsException} if it is not smaller than the limit
* or is smaller than zero.
*/
+ @HotSpotIntrinsicCandidate
final int checkIndex(int i) { // package-private
if ((i < 0) || (i >= limit))
throw new IndexOutOfBoundsException();
return i;
}
src/java.base/share/classes/java/nio/Buffer.java
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File