< prev index next >

src/hotspot/share/utilities/constantTag.hpp

Print this page
*** 37,25 ***
    // NOTE: replicated in SA in vm/agent/sun/jvm/hotspot/utilities/ConstantTag.java
    // Hotspot specific tags
    JVM_CONSTANT_Invalid                  = 0,    // For bad value initialization
    JVM_CONSTANT_InternalMin              = 100,  // First implementation tag (aside from bad value of course)
    JVM_CONSTANT_UnresolvedClass          = 100,  // Temporary tag until actual use
!   JVM_CONSTANT_ClassIndex               = 101,  // Temporary tag while constructing constant pool
!   JVM_CONSTANT_StringIndex              = 102,  // Temporary tag while constructing constant pool
    JVM_CONSTANT_UnresolvedClassInError   = 103,  // Error tag due to resolution error
    JVM_CONSTANT_MethodHandleInError      = 104,  // Error tag due to resolution error
    JVM_CONSTANT_MethodTypeInError        = 105,  // Error tag due to resolution error
    JVM_CONSTANT_DynamicInError           = 106,  // Error tag due to resolution error
!   JVM_CONSTANT_InternalMax              = 106   // Last implementation tag
  };
  
- 
  class constantTag {
   private:
    jbyte _tag;
   public:
!   bool is_klass() const             { return _tag == JVM_CONSTANT_Class; }
    bool is_field () const            { return _tag == JVM_CONSTANT_Fieldref; }
    bool is_method() const            { return _tag == JVM_CONSTANT_Methodref; }
    bool is_interface_method() const  { return _tag == JVM_CONSTANT_InterfaceMethodref; }
    bool is_string() const            { return _tag == JVM_CONSTANT_String; }
    bool is_int() const               { return _tag == JVM_CONSTANT_Integer; }
--- 37,24 ---
    // NOTE: replicated in SA in vm/agent/sun/jvm/hotspot/utilities/ConstantTag.java
    // Hotspot specific tags
    JVM_CONSTANT_Invalid                  = 0,    // For bad value initialization
    JVM_CONSTANT_InternalMin              = 100,  // First implementation tag (aside from bad value of course)
    JVM_CONSTANT_UnresolvedClass          = 100,  // Temporary tag until actual use
!   JVM_CONSTANT_ClassIndex               = 101,  // Temporary tag while constructing constant pool, class redefinition
!   JVM_CONSTANT_StringIndex              = 102,  // Temporary tag while constructing constant pool, class redefinition
    JVM_CONSTANT_UnresolvedClassInError   = 103,  // Error tag due to resolution error
    JVM_CONSTANT_MethodHandleInError      = 104,  // Error tag due to resolution error
    JVM_CONSTANT_MethodTypeInError        = 105,  // Error tag due to resolution error
    JVM_CONSTANT_DynamicInError           = 106,  // Error tag due to resolution error
!   JVM_CONSTANT_InternalMax              = 106,  // Last implementation tag
  };
  
  class constantTag {
   private:
    jbyte _tag;
   public:
!   bool is_klass() const             { return value() == JVM_CONSTANT_Class; }
    bool is_field () const            { return _tag == JVM_CONSTANT_Fieldref; }
    bool is_method() const            { return _tag == JVM_CONSTANT_Methodref; }
    bool is_interface_method() const  { return _tag == JVM_CONSTANT_InterfaceMethodref; }
    bool is_string() const            { return _tag == JVM_CONSTANT_String; }
    bool is_int() const               { return _tag == JVM_CONSTANT_Integer; }

*** 66,15 ***
    bool is_utf8() const              { return _tag == JVM_CONSTANT_Utf8; }
  
    bool is_invalid() const           { return _tag == JVM_CONSTANT_Invalid; }
  
    bool is_unresolved_klass() const {
!     return _tag == JVM_CONSTANT_UnresolvedClass || _tag == JVM_CONSTANT_UnresolvedClassInError;
    }
  
    bool is_unresolved_klass_in_error() const {
!     return _tag == JVM_CONSTANT_UnresolvedClassInError;
    }
  
    bool is_method_handle_in_error() const {
      return _tag == JVM_CONSTANT_MethodHandleInError;
    }
--- 65,15 ---
    bool is_utf8() const              { return _tag == JVM_CONSTANT_Utf8; }
  
    bool is_invalid() const           { return _tag == JVM_CONSTANT_Invalid; }
  
    bool is_unresolved_klass() const {
!     return value() == JVM_CONSTANT_UnresolvedClass || value() == JVM_CONSTANT_UnresolvedClassInError;
    }
  
    bool is_unresolved_klass_in_error() const {
!     return value() == JVM_CONSTANT_UnresolvedClassInError;
    }
  
    bool is_method_handle_in_error() const {
      return _tag == JVM_CONSTANT_MethodHandleInError;
    }

*** 147,10 ***
--- 146,11 ---
          return JVM_CONSTANT_Invalid;
      }
    }
  
    jbyte value() const                { return _tag; }
+   jbyte tag() const                  { return _tag; }
    jbyte error_value() const;
    jbyte non_error_value() const;
  
    BasicType basic_type() const;        // if used with ldc, what kind of value gets pushed?
  
< prev index next >