diff agent/src/share/classes/sun/jvm/hotspot/utilities/ConstantTag.java @ 6725:da91efe96a93

6964458: Reimplement class meta-data storage to use native memory Summary: Remove PermGen, allocate meta-data in metaspace linked to class loaders, rewrite GC walking, rewrite and rename metadata to be C++ classes Reviewed-by: jmasa, stefank, never, coleenp, kvn, brutisso, mgerdin, dholmes, jrose, twisti, roland Contributed-by: jmasa <jon.masamitsu@oracle.com>, stefank <stefan.karlsson@oracle.com>, mgerdin <mikael.gerdin@oracle.com>, never <tom.rodriguez@oracle.com>
author coleenp
date Sat, 01 Sep 2012 13:25:18 -0400
parents 6a991dcb52bb
children f16e75e0cf11
line wrap: on
line diff
--- a/agent/src/share/classes/sun/jvm/hotspot/utilities/ConstantTag.java	Fri Aug 31 16:39:35 2012 -0700
+++ b/agent/src/share/classes/sun/jvm/hotspot/utilities/ConstantTag.java	Sat Sep 01 13:25:18 2012 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -47,10 +47,11 @@
   private static final int JVM_CONSTANT_Invalid                 = 0;   // For bad value initialization
   private static final int JVM_CONSTANT_UnresolvedClass         = 100; // Temporary tag until actual use
   private static final int JVM_CONSTANT_ClassIndex              = 101; // Temporary tag while constructing constant pool
-  private static final int JVM_CONSTANT_UnresolvedString        = 102; // Temporary tag until actual use
-  private static final int JVM_CONSTANT_StringIndex             = 103; // Temporary tag while constructing constant pool
-  private static final int JVM_CONSTANT_UnresolvedClassInError  = 104; // Resolution failed
-  private static final int JVM_CONSTANT_Object                  = 105; // Required for BoundMethodHandle arguments.
+  private static final int JVM_CONSTANT_StringIndex             = 102; // Temporary tag while constructing constant pool
+  private static final int JVM_CONSTANT_UnresolvedClassInError  = 103; // Resolution failed
+  private static final int JVM_CONSTANT_MethodHandleInError     = 104; // Error tag due to resolution error
+  private static final int JVM_CONSTANT_MethodTypeInError       = 105; // Error tag due to resolution error
+  private static final int JVM_CONSTANT_Object                  = 106; // Required for BoundMethodHandle arguments.
 
   // JVM_CONSTANT_MethodHandle subtypes //FIXME: connect these to data structure
   private static int JVM_REF_getField                = 1;
@@ -93,7 +94,6 @@
   }
   public boolean isUnresolveKlassInError()  { return tag == JVM_CONSTANT_UnresolvedClassInError; }
   public boolean isKlassIndex()             { return tag == JVM_CONSTANT_ClassIndex; }
-  public boolean isUnresolvedString()       { return tag == JVM_CONSTANT_UnresolvedString; }
   public boolean isStringIndex()            { return tag == JVM_CONSTANT_StringIndex; }
 
   public boolean isObject()                 { return tag == JVM_CONSTANT_Object; }
@@ -117,8 +117,9 @@
     case JVM_CONSTANT_String :
     case JVM_CONSTANT_UnresolvedClass :
     case JVM_CONSTANT_UnresolvedClassInError :
+    case JVM_CONSTANT_MethodHandleInError :
+    case JVM_CONSTANT_MethodTypeInError :
     case JVM_CONSTANT_ClassIndex :
-    case JVM_CONSTANT_UnresolvedString :
     case JVM_CONSTANT_StringIndex :
     case JVM_CONSTANT_MethodHandle :
     case JVM_CONSTANT_MethodType :
@@ -128,4 +129,8 @@
       throw new InternalError("unexpected tag: " + tag);
     }
   }
+
+  public String toString() {
+    return "ConstantTag:" + Integer.toString(tag);
 }
+}