hotspot/test/compiler/dependencies/MonomorphicObjectCall/java/lang/Object.java
changeset 31587 e48945b7849c
parent 27700 a402738ebfcf
child 31856 614d6786ba55
equal deleted inserted replaced
31586:6e57742d1adb 31587:e48945b7849c
    23  * questions.
    23  * questions.
    24  */
    24  */
    25 
    25 
    26 package java.lang;
    26 package java.lang;
    27 
    27 
       
    28 import jdk.internal.HotSpotIntrinsicCandidate;
       
    29 
    28 /**
    30 /**
    29  * Slightly modified version of java.lang.Object that replaces
    31  * Slightly modified version of java.lang.Object that replaces
    30  * finalize() by finalizeObject() to avoid overriding in subclasses.
    32  * finalize() by finalizeObject() to avoid overriding in subclasses.
    31  */
    33  */
    32 public class Object {
    34 public class Object {
    33 
    35 
       
    36     @HotSpotIntrinsicCandidate
       
    37     public Object() {}
       
    38 
    34     private static native void registerNatives();
    39     private static native void registerNatives();
    35     static {
    40     static {
    36         registerNatives();
    41         registerNatives();
    37     }
    42     }
    38 
    43 
       
    44     @HotSpotIntrinsicCandidate
    39     public final native Class<?> getClass();
    45     public final native Class<?> getClass();
    40 
    46 
       
    47     @HotSpotIntrinsicCandidate
    41     public native int hashCode();
    48     public native int hashCode();
    42 
    49 
    43     public boolean equals(Object obj) {
    50     public boolean equals(Object obj) {
    44         return (this == obj);
    51         return (this == obj);
    45     }
    52     }
    46 
    53 
       
    54     @HotSpotIntrinsicCandidate
    47     protected native Object clone() throws CloneNotSupportedException;
    55     protected native Object clone() throws CloneNotSupportedException;
    48 
    56 
    49     public String toString() {
    57     public String toString() {
    50         return getClass().getName() + "@" + Integer.toHexString(hashCode());
    58         return getClass().getName() + "@" + Integer.toHexString(hashCode());
    51     }
    59     }