< prev index next >

test/hotspot/jtreg/compiler/dependencies/MonomorphicObjectCall/java.base/java/lang/Object.java

Print this page
rev 56655 : 8232613: Move Object.registerNatives into HotSpot
Reviewed-by: alanb, coleenp, lfoltan, dholmes, adinn


  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 package java.lang;
  25 
  26 import jdk.internal.HotSpotIntrinsicCandidate;
  27 
  28 /**
  29  * Slightly modified version of java.lang.Object that replaces
  30  * finalize() by finalizeObject() to avoid overriding in subclasses.
  31  */
  32 public class Object {
  33 
  34     @HotSpotIntrinsicCandidate
  35     public Object() {}
  36 
  37     private static native void registerNatives();
  38     static {
  39         registerNatives();
  40     }
  41 
  42     @HotSpotIntrinsicCandidate
  43     public final native Class<?> getClass();
  44 
  45     @HotSpotIntrinsicCandidate
  46     public native int hashCode();
  47 
  48     public boolean equals(Object obj) {
  49         return (this == obj);
  50     }
  51 
  52     @HotSpotIntrinsicCandidate
  53     protected native Object clone() throws CloneNotSupportedException;
  54 
  55     public String toString() {
  56         return getClass().getName() + "@" + Integer.toHexString(hashCode());
  57     }
  58 
  59     @HotSpotIntrinsicCandidate
  60     public final native void notify();
  61 




  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 package java.lang;
  25 
  26 import jdk.internal.HotSpotIntrinsicCandidate;
  27 
  28 /**
  29  * Slightly modified version of java.lang.Object that replaces
  30  * finalize() by finalizeObject() to avoid overriding in subclasses.
  31  */
  32 public class Object {
  33 
  34     @HotSpotIntrinsicCandidate
  35     public Object() {}
  36 





  37     @HotSpotIntrinsicCandidate
  38     public final native Class<?> getClass();
  39 
  40     @HotSpotIntrinsicCandidate
  41     public native int hashCode();
  42 
  43     public boolean equals(Object obj) {
  44         return (this == obj);
  45     }
  46 
  47     @HotSpotIntrinsicCandidate
  48     protected native Object clone() throws CloneNotSupportedException;
  49 
  50     public String toString() {
  51         return getClass().getName() + "@" + Integer.toHexString(hashCode());
  52     }
  53 
  54     @HotSpotIntrinsicCandidate
  55     public final native void notify();
  56 


< prev index next >