< prev index next >

src/share/vm/classfile/verificationType.cpp

Print this page




 118   Symbol* component;
 119   switch (name()->byte_at(1)) {
 120     case 'Z': return VerificationType(Boolean);
 121     case 'B': return VerificationType(Byte);
 122     case 'C': return VerificationType(Char);
 123     case 'S': return VerificationType(Short);
 124     case 'I': return VerificationType(Integer);
 125     case 'J': return VerificationType(Long);
 126     case 'F': return VerificationType(Float);
 127     case 'D': return VerificationType(Double);
 128     case '[':
 129       component = context->create_temporary_symbol(
 130         name(), 1, name()->utf8_length(),
 131         CHECK_(VerificationType::bogus_type()));
 132       return VerificationType::reference_type(component);
 133     case 'L':
 134       component = context->create_temporary_symbol(
 135         name(), 2, name()->utf8_length() - 1,
 136         CHECK_(VerificationType::bogus_type()));
 137       return VerificationType::reference_type(component);





 138     default:
 139       // Met an invalid type signature, e.g. [X
 140       return VerificationType::bogus_type();
 141   }
 142 }
 143 
 144 void VerificationType::print_on(outputStream* st) const {
 145   switch (_u._data) {
 146     case Bogus:            st->print("top"); break;
 147     case Category1:        st->print("category1"); break;
 148     case Category2:        st->print("category2"); break;
 149     case Category2_2nd:    st->print("category2_2nd"); break;
 150     case Boolean:          st->print("boolean"); break;
 151     case Byte:             st->print("byte"); break;
 152     case Short:            st->print("short"); break;
 153     case Char:             st->print("char"); break;
 154     case Integer:          st->print("integer"); break;
 155     case Float:            st->print("float"); break;
 156     case Long:             st->print("long"); break;
 157     case Double:           st->print("double"); break;
 158     case Long_2nd:         st->print("long_2nd"); break;
 159     case Double_2nd:       st->print("double_2nd"); break;
 160     case Null:             st->print("null"); break;
 161     case ReferenceQuery:   st->print("reference type"); break;

 162     case Category1Query:   st->print("category1 type"); break;
 163     case Category2Query:   st->print("category2 type"); break;
 164     case Category2_2ndQuery: st->print("category2_2nd type"); break;
 165     default:
 166       if (is_uninitialized_this()) {
 167         st->print("uninitializedThis");
 168       } else if (is_uninitialized()) {
 169         st->print("uninitialized %d", bci());
 170       } else {
 171         name()->print_value_on(st);
 172       }
 173   }
 174 }


 118   Symbol* component;
 119   switch (name()->byte_at(1)) {
 120     case 'Z': return VerificationType(Boolean);
 121     case 'B': return VerificationType(Byte);
 122     case 'C': return VerificationType(Char);
 123     case 'S': return VerificationType(Short);
 124     case 'I': return VerificationType(Integer);
 125     case 'J': return VerificationType(Long);
 126     case 'F': return VerificationType(Float);
 127     case 'D': return VerificationType(Double);
 128     case '[':
 129       component = context->create_temporary_symbol(
 130         name(), 1, name()->utf8_length(),
 131         CHECK_(VerificationType::bogus_type()));
 132       return VerificationType::reference_type(component);
 133     case 'L':
 134       component = context->create_temporary_symbol(
 135         name(), 2, name()->utf8_length() - 1,
 136         CHECK_(VerificationType::bogus_type()));
 137       return VerificationType::reference_type(component);
 138     case 'Q':
 139       component = context->create_temporary_symbol(
 140         name(), 2, name()->utf8_length() - 1,
 141         CHECK_(VerificationType::bogus_type()));
 142       return VerificationType::valuetype_type(component);
 143     default:
 144       // Met an invalid type signature, e.g. [X
 145       return VerificationType::bogus_type();
 146   }
 147 }
 148 
 149 void VerificationType::print_on(outputStream* st) const {
 150   switch (_u._data) {
 151     case Bogus:            st->print("top"); break;
 152     case Category1:        st->print("category1"); break;
 153     case Category2:        st->print("category2"); break;
 154     case Category2_2nd:    st->print("category2_2nd"); break;
 155     case Boolean:          st->print("boolean"); break;
 156     case Byte:             st->print("byte"); break;
 157     case Short:            st->print("short"); break;
 158     case Char:             st->print("char"); break;
 159     case Integer:          st->print("integer"); break;
 160     case Float:            st->print("float"); break;
 161     case Long:             st->print("long"); break;
 162     case Double:           st->print("double"); break;
 163     case Long_2nd:         st->print("long_2nd"); break;
 164     case Double_2nd:       st->print("double_2nd"); break;
 165     case Null:             st->print("null"); break;
 166     case ReferenceQuery:   st->print("reference type"); break;
 167     case ValueTypeQuery:   st->print("value type"); break;
 168     case Category1Query:   st->print("category1 type"); break;
 169     case Category2Query:   st->print("category2 type"); break;
 170     case Category2_2ndQuery: st->print("category2_2nd type"); break;
 171     default:
 172       if (is_uninitialized_this()) {
 173         st->print("uninitializedThis");
 174       } else if (is_uninitialized()) {
 175         st->print("uninitialized %d", bci());
 176       } else {
 177         name()->print_value_on(st);
 178       }
 179   }
 180 }
< prev index next >