src/share/vm/classfile/verificationType.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/classfile

src/share/vm/classfile/verificationType.cpp

Print this page
rev 3510 : 7116786: RFE: Detailed information on VerifyErrors
Summary: Provide additional detail in VerifyError messages
Reviewed-by:


  93     case 'I': return VerificationType(Integer);
  94     case 'J': return VerificationType(Long);
  95     case 'F': return VerificationType(Float);
  96     case 'D': return VerificationType(Double);
  97     case '[':
  98       component = context->create_temporary_symbol(
  99         name(), 1, name()->utf8_length(),
 100         CHECK_(VerificationType::bogus_type()));
 101       return VerificationType::reference_type(component);
 102     case 'L':
 103       component = context->create_temporary_symbol(
 104         name(), 2, name()->utf8_length() - 1,
 105         CHECK_(VerificationType::bogus_type()));
 106       return VerificationType::reference_type(component);
 107     default:
 108       // Met an invalid type signature, e.g. [X
 109       return VerificationType::bogus_type();
 110   }
 111 }
 112 
 113 #ifndef PRODUCT
 114 
 115 void VerificationType::print_on(outputStream* st) const {
 116   switch (_u._data) {
 117     case Bogus:            st->print(" bogus "); break;
 118     case Category1:        st->print(" category1 "); break;
 119     case Category2:        st->print(" category2 "); break;
 120     case Category2_2nd:    st->print(" category2_2nd "); break;
 121     case Boolean:          st->print(" boolean "); break;
 122     case Byte:             st->print(" byte "); break;
 123     case Short:            st->print(" short "); break;
 124     case Char:             st->print(" char "); break;
 125     case Integer:          st->print(" integer "); break;
 126     case Float:            st->print(" float "); break;
 127     case Long:             st->print(" long "); break;
 128     case Double:           st->print(" double "); break;
 129     case Long_2nd:         st->print(" long_2nd "); break;
 130     case Double_2nd:       st->print(" double_2nd "); break;
 131     case Null:             st->print(" null "); break;




 132     default:
 133       if (is_uninitialized_this()) {
 134         st->print(" uninitializedThis ");
 135       } else if (is_uninitialized()) {
 136         st->print(" uninitialized %d ", bci());
 137       } else {
 138         st->print(" class %s ", name()->as_klass_external_name());
 139       }
 140   }
 141 }
 142 
 143 #endif


  93     case 'I': return VerificationType(Integer);
  94     case 'J': return VerificationType(Long);
  95     case 'F': return VerificationType(Float);
  96     case 'D': return VerificationType(Double);
  97     case '[':
  98       component = context->create_temporary_symbol(
  99         name(), 1, name()->utf8_length(),
 100         CHECK_(VerificationType::bogus_type()));
 101       return VerificationType::reference_type(component);
 102     case 'L':
 103       component = context->create_temporary_symbol(
 104         name(), 2, name()->utf8_length() - 1,
 105         CHECK_(VerificationType::bogus_type()));
 106       return VerificationType::reference_type(component);
 107     default:
 108       // Met an invalid type signature, e.g. [X
 109       return VerificationType::bogus_type();
 110   }
 111 }
 112 


 113 void VerificationType::print_on(outputStream* st) const {
 114   switch (_u._data) {
 115     case Bogus:            st->print("top"); break;
 116     case Category1:        st->print("category1"); break;
 117     case Category2:        st->print("category2"); break;
 118     case Category2_2nd:    st->print("category2_2nd"); break;
 119     case Boolean:          st->print("boolean"); break;
 120     case Byte:             st->print("byte"); break;
 121     case Short:            st->print("short"); break;
 122     case Char:             st->print("char"); break;
 123     case Integer:          st->print("integer"); break;
 124     case Float:            st->print("float"); break;
 125     case Long:             st->print("long"); break;
 126     case Double:           st->print("double"); break;
 127     case Long_2nd:         st->print("long_2nd"); break;
 128     case Double_2nd:       st->print("double_2nd"); break;
 129     case Null:             st->print("null"); break;
 130     case ReferenceQuery:   st->print("reference type"); break;
 131     case Category1Query:   st->print("category1 type"); break;
 132     case Category2Query:   st->print("category2 type"); break;
 133     case Category2_2ndQuery: st->print("category2_2nd type"); break;
 134     default:
 135       if (is_uninitialized_this()) {
 136         st->print("uninitializedThis");
 137       } else if (is_uninitialized()) {
 138         st->print("uninitialized %d", bci());
 139       } else {
 140         name()->print_value_on(st);
 141       }
 142   }
 143 }


src/share/vm/classfile/verificationType.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File