hotspot/src/share/vm/utilities/constantTag.hpp
changeset 5882 6b2aecc4f7d8
parent 5547 f4b087cbb361
child 6062 bab93afe9df7
equal deleted inserted replaced
5708:e92b3d8118f1 5882:6b2aecc4f7d8
    76   bool is_klass_reference() const   { return is_klass_index() || is_unresolved_klass(); }
    76   bool is_klass_reference() const   { return is_klass_index() || is_unresolved_klass(); }
    77   bool is_klass_or_reference() const{ return is_klass() || is_klass_reference(); }
    77   bool is_klass_or_reference() const{ return is_klass() || is_klass_reference(); }
    78   bool is_field_or_method() const   { return is_field() || is_method() || is_interface_method(); }
    78   bool is_field_or_method() const   { return is_field() || is_method() || is_interface_method(); }
    79   bool is_symbol() const            { return is_utf8(); }
    79   bool is_symbol() const            { return is_utf8(); }
    80 
    80 
       
    81   bool is_method_type() const              { return _tag == JVM_CONSTANT_MethodType; }
       
    82   bool is_method_handle() const            { return _tag == JVM_CONSTANT_MethodHandle; }
       
    83 
       
    84   constantTag() {
       
    85     _tag = JVM_CONSTANT_Invalid;
       
    86   }
    81   constantTag(jbyte tag) {
    87   constantTag(jbyte tag) {
    82     assert((tag >= 0 && tag <= JVM_CONSTANT_NameAndType) ||
    88     assert((tag >= 0 && tag <= JVM_CONSTANT_NameAndType) ||
       
    89            (tag >= JVM_CONSTANT_MethodHandle && tag <= JVM_CONSTANT_MethodType) ||
    83            (tag >= JVM_CONSTANT_InternalMin && tag <= JVM_CONSTANT_InternalMax), "Invalid constant tag");
    90            (tag >= JVM_CONSTANT_InternalMin && tag <= JVM_CONSTANT_InternalMax), "Invalid constant tag");
    84     _tag = tag;
    91     _tag = tag;
    85   }
    92   }
    86 
    93 
    87   jbyte value()                      { return _tag; }
    94   jbyte value()                      { return _tag; }
    88 
    95 
       
    96   BasicType basic_type() const;        // if used with ldc, what kind of value gets pushed?
       
    97 
       
    98   const char* internal_name() const;  // for error reporting
       
    99 
    89   void print_on(outputStream* st) const PRODUCT_RETURN;
   100   void print_on(outputStream* st) const PRODUCT_RETURN;
    90 };
   101 };