mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8076112: Add @HotSpotIntrinsicCandidate annotation to indicate methods for which Java Runtime has intrinsics
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
This commit is contained in:
parent
34616cd876
commit
9245cdc214
13 changed files with 191 additions and 44 deletions
|
@ -25,25 +25,33 @@
|
|||
|
||||
package java.lang;
|
||||
|
||||
import jdk.internal.HotSpotIntrinsicCandidate;
|
||||
|
||||
/**
|
||||
* Slightly modified version of java.lang.Object that replaces
|
||||
* finalize() by finalizeObject() to avoid overriding in subclasses.
|
||||
*/
|
||||
public class Object {
|
||||
|
||||
@HotSpotIntrinsicCandidate
|
||||
public Object() {}
|
||||
|
||||
private static native void registerNatives();
|
||||
static {
|
||||
registerNatives();
|
||||
}
|
||||
|
||||
@HotSpotIntrinsicCandidate
|
||||
public final native Class<?> getClass();
|
||||
|
||||
@HotSpotIntrinsicCandidate
|
||||
public native int hashCode();
|
||||
|
||||
public boolean equals(Object obj) {
|
||||
return (this == obj);
|
||||
}
|
||||
|
||||
@HotSpotIntrinsicCandidate
|
||||
protected native Object clone() throws CloneNotSupportedException;
|
||||
|
||||
public String toString() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue