src/hotspot/share/classfile/verificationType.cpp
author lfoltan
Mon, 21 Oct 2019 13:13:16 -0400
changeset 58722 cba8afa5cfed
parent 58537 30a9612a657d
child 58760 1f7f707c1aa9
permissions -rw-r--r--
8231844: Enhance type signature characters in classfile_constants.h and improve the JVM to use type signature characters more consistently Summary: Increase the use of type signature constants instead of hard coded characters within the JVM. Reviewed-by: coleenp, dholmes, fparain Contributed-by: lois.foltan@oracle.com, john.r.rose@oracle.com
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     1
/*
54847
59ea39bb2809 8223657: Remove unused THREAD argument from SymbolTable functions
coleenp
parents: 53322
diff changeset
     2
 * Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     4
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
489c9b5090e2 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
489c9b5090e2 Initial load
duke
parents:
diff changeset
     7
 * published by the Free Software Foundation.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     8
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
489c9b5090e2 Initial load
duke
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
489c9b5090e2 Initial load
duke
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
489c9b5090e2 Initial load
duke
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
489c9b5090e2 Initial load
duke
parents:
diff changeset
    13
 * accompanied this code).
489c9b5090e2 Initial load
duke
parents:
diff changeset
    14
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
489c9b5090e2 Initial load
duke
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    18
 *
5547
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1
diff changeset
    21
 * questions.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    22
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    23
 */
489c9b5090e2 Initial load
duke
parents:
diff changeset
    24
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 6473
diff changeset
    25
#include "precompiled.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 6473
diff changeset
    26
#include "classfile/symbolTable.hpp"
39713
29ece76096cb 8150752: Share Class Data
iklam
parents: 38151
diff changeset
    27
#include "classfile/systemDictionaryShared.hpp"
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 6473
diff changeset
    28
#include "classfile/verificationType.hpp"
8076
96d498ec7ae1 6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents: 7397
diff changeset
    29
#include "classfile/verifier.hpp"
49594
898ef81cbc0e 8200106: Move NoSafepointVerifier out from gcLocker.hpp
stefank
parents: 49393
diff changeset
    30
#include "logging/log.hpp"
58537
30a9612a657d 8232050: Improve inlining of Klass accessors
redestad
parents: 58447
diff changeset
    31
#include "oops/klass.inline.hpp"
49393
93fe2fc5c093 8199472: Fix non-PCH build after JDK-8199319
simonis
parents: 47216
diff changeset
    32
#include "runtime/handles.inline.hpp"
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    33
489c9b5090e2 Initial load
duke
parents:
diff changeset
    34
VerificationType VerificationType::from_tag(u1 tag) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    35
  switch (tag) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    36
    case ITEM_Top:     return bogus_type();
489c9b5090e2 Initial load
duke
parents:
diff changeset
    37
    case ITEM_Integer: return integer_type();
489c9b5090e2 Initial load
duke
parents:
diff changeset
    38
    case ITEM_Float:   return float_type();
489c9b5090e2 Initial load
duke
parents:
diff changeset
    39
    case ITEM_Double:  return double_type();
489c9b5090e2 Initial load
duke
parents:
diff changeset
    40
    case ITEM_Long:    return long_type();
489c9b5090e2 Initial load
duke
parents:
diff changeset
    41
    case ITEM_Null:    return null_type();
489c9b5090e2 Initial load
duke
parents:
diff changeset
    42
    default:
489c9b5090e2 Initial load
duke
parents:
diff changeset
    43
      ShouldNotReachHere();
489c9b5090e2 Initial load
duke
parents:
diff changeset
    44
      return bogus_type();
489c9b5090e2 Initial load
duke
parents:
diff changeset
    45
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    46
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
    47
46329
53ccc37bda19 8155672: Remove instanceKlassHandles and KlassHandles
coleenp
parents: 46271
diff changeset
    48
bool VerificationType::resolve_and_check_assignability(InstanceKlass* klass, Symbol* name,
39713
29ece76096cb 8150752: Share Class Data
iklam
parents: 38151
diff changeset
    49
         Symbol* from_name, bool from_field_is_protected, bool from_is_array, bool from_is_object, TRAPS) {
46271
979ebd346ecf 8169881: Remove implicit Handle conversions oop->Handle
coleenp
parents: 39713
diff changeset
    50
  HandleMark hm(THREAD);
46329
53ccc37bda19 8155672: Remove instanceKlassHandles and KlassHandles
coleenp
parents: 46271
diff changeset
    51
  Klass* this_class = SystemDictionary::resolve_or_fail(
39713
29ece76096cb 8150752: Share Class Data
iklam
parents: 38151
diff changeset
    52
      name, Handle(THREAD, klass->class_loader()),
29ece76096cb 8150752: Share Class Data
iklam
parents: 38151
diff changeset
    53
      Handle(THREAD, klass->protection_domain()), true, CHECK_false);
29ece76096cb 8150752: Share Class Data
iklam
parents: 38151
diff changeset
    54
  if (log_is_enabled(Debug, class, resolve)) {
46329
53ccc37bda19 8155672: Remove instanceKlassHandles and KlassHandles
coleenp
parents: 46271
diff changeset
    55
    Verifier::trace_class_resolution(this_class, klass);
39713
29ece76096cb 8150752: Share Class Data
iklam
parents: 38151
diff changeset
    56
  }
29ece76096cb 8150752: Share Class Data
iklam
parents: 38151
diff changeset
    57
29ece76096cb 8150752: Share Class Data
iklam
parents: 38151
diff changeset
    58
  if (this_class->is_interface() && (!from_field_is_protected ||
29ece76096cb 8150752: Share Class Data
iklam
parents: 38151
diff changeset
    59
      from_name != vmSymbols::java_lang_Object())) {
29ece76096cb 8150752: Share Class Data
iklam
parents: 38151
diff changeset
    60
    // If we are not trying to access a protected field or method in
29ece76096cb 8150752: Share Class Data
iklam
parents: 38151
diff changeset
    61
    // java.lang.Object then, for arrays, we only allow assignability
29ece76096cb 8150752: Share Class Data
iklam
parents: 38151
diff changeset
    62
    // to interfaces java.lang.Cloneable and java.io.Serializable.
29ece76096cb 8150752: Share Class Data
iklam
parents: 38151
diff changeset
    63
    // Otherwise, we treat interfaces as java.lang.Object.
29ece76096cb 8150752: Share Class Data
iklam
parents: 38151
diff changeset
    64
    return !from_is_array ||
29ece76096cb 8150752: Share Class Data
iklam
parents: 38151
diff changeset
    65
      this_class == SystemDictionary::Cloneable_klass() ||
29ece76096cb 8150752: Share Class Data
iklam
parents: 38151
diff changeset
    66
      this_class == SystemDictionary::Serializable_klass();
29ece76096cb 8150752: Share Class Data
iklam
parents: 38151
diff changeset
    67
  } else if (from_is_object) {
29ece76096cb 8150752: Share Class Data
iklam
parents: 38151
diff changeset
    68
    Klass* from_class = SystemDictionary::resolve_or_fail(
29ece76096cb 8150752: Share Class Data
iklam
parents: 38151
diff changeset
    69
        from_name, Handle(THREAD, klass->class_loader()),
29ece76096cb 8150752: Share Class Data
iklam
parents: 38151
diff changeset
    70
        Handle(THREAD, klass->protection_domain()), true, CHECK_false);
29ece76096cb 8150752: Share Class Data
iklam
parents: 38151
diff changeset
    71
    if (log_is_enabled(Debug, class, resolve)) {
46329
53ccc37bda19 8155672: Remove instanceKlassHandles and KlassHandles
coleenp
parents: 46271
diff changeset
    72
      Verifier::trace_class_resolution(from_class, klass);
39713
29ece76096cb 8150752: Share Class Data
iklam
parents: 38151
diff changeset
    73
    }
46329
53ccc37bda19 8155672: Remove instanceKlassHandles and KlassHandles
coleenp
parents: 46271
diff changeset
    74
    return InstanceKlass::cast(from_class)->is_subclass_of(this_class);
39713
29ece76096cb 8150752: Share Class Data
iklam
parents: 38151
diff changeset
    75
  }
29ece76096cb 8150752: Share Class Data
iklam
parents: 38151
diff changeset
    76
29ece76096cb 8150752: Share Class Data
iklam
parents: 38151
diff changeset
    77
  return false;
29ece76096cb 8150752: Share Class Data
iklam
parents: 38151
diff changeset
    78
}
29ece76096cb 8150752: Share Class Data
iklam
parents: 38151
diff changeset
    79
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    80
bool VerificationType::is_reference_assignable_from(
27022
2db6fe33afc2 8036533: Method for correct defaults
hseigel
parents: 13728
diff changeset
    81
    const VerificationType& from, ClassVerifier* context,
2db6fe33afc2 8036533: Method for correct defaults
hseigel
parents: 13728
diff changeset
    82
    bool from_field_is_protected, TRAPS) const {
46329
53ccc37bda19 8155672: Remove instanceKlassHandles and KlassHandles
coleenp
parents: 46271
diff changeset
    83
  InstanceKlass* klass = context->current_class();
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    84
  if (from.is_null()) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    85
    // null is assignable to any reference
489c9b5090e2 Initial load
duke
parents:
diff changeset
    86
    return true;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    87
  } else if (is_null()) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    88
    return false;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    89
  } else if (name() == from.name()) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    90
    return true;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    91
  } else if (is_object()) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    92
    // We need check the class hierarchy to check assignability
489c9b5090e2 Initial load
duke
parents:
diff changeset
    93
    if (name() == vmSymbols::java_lang_Object()) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    94
      // any object or array is assignable to java.lang.Object
489c9b5090e2 Initial load
duke
parents:
diff changeset
    95
      return true;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    96
    }
39713
29ece76096cb 8150752: Share Class Data
iklam
parents: 38151
diff changeset
    97
58447
319173c62caa 8231606: _method_ordering is not set during CDS dynamic dump time
ccheung
parents: 54927
diff changeset
    98
    if (Arguments::is_dumping_archive()) {
54927
1512d88b24c6 8207812: Implement Dynamic CDS Archive
ccheung
parents: 54847
diff changeset
    99
      if (SystemDictionaryShared::add_verification_constraint(klass,
39713
29ece76096cb 8150752: Share Class Data
iklam
parents: 38151
diff changeset
   100
              name(), from.name(), from_field_is_protected, from.is_array(),
29ece76096cb 8150752: Share Class Data
iklam
parents: 38151
diff changeset
   101
              from.is_object())) {
54927
1512d88b24c6 8207812: Implement Dynamic CDS Archive
ccheung
parents: 54847
diff changeset
   102
        // If add_verification_constraint() returns true, the resolution/check should be
1512d88b24c6 8207812: Implement Dynamic CDS Archive
ccheung
parents: 54847
diff changeset
   103
        // delayed until runtime.
1512d88b24c6 8207812: Implement Dynamic CDS Archive
ccheung
parents: 54847
diff changeset
   104
        return true;
1512d88b24c6 8207812: Implement Dynamic CDS Archive
ccheung
parents: 54847
diff changeset
   105
      }
30616
fde3a4fee412 8076318: split verifier needs to add TraceClassResolution
hseigel
parents: 27022
diff changeset
   106
    }
fde3a4fee412 8076318: split verifier needs to add TraceClassResolution
hseigel
parents: 27022
diff changeset
   107
46329
53ccc37bda19 8155672: Remove instanceKlassHandles and KlassHandles
coleenp
parents: 46271
diff changeset
   108
    return resolve_and_check_assignability(klass, name(), from.name(),
39713
29ece76096cb 8150752: Share Class Data
iklam
parents: 38151
diff changeset
   109
          from_field_is_protected, from.is_array(), from.is_object(), THREAD);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   110
  } else if (is_array() && from.is_array()) {
8076
96d498ec7ae1 6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents: 7397
diff changeset
   111
    VerificationType comp_this = get_component(context, CHECK_false);
96d498ec7ae1 6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents: 7397
diff changeset
   112
    VerificationType comp_from = from.get_component(context, CHECK_false);
6172
e1d9c632fa3c 6964170: Verifier crashes
apangin
parents: 5547
diff changeset
   113
    if (!comp_this.is_bogus() && !comp_from.is_bogus()) {
31966
aa9c386e1240 8129895: New verifier fails to reject erroneous cast from int[] to other arrays of small integer types
hseigel
parents: 30616
diff changeset
   114
      return comp_this.is_component_assignable_from(comp_from, context,
52067
2e72562697bf 8211394: CHECK_ must be used in the rhs of an assignment statement within a block
dholmes
parents: 51997
diff changeset
   115
                                                    from_field_is_protected, THREAD);
6172
e1d9c632fa3c 6964170: Verifier crashes
apangin
parents: 5547
diff changeset
   116
    }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   117
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   118
  return false;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   119
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   120
8076
96d498ec7ae1 6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents: 7397
diff changeset
   121
VerificationType VerificationType::get_component(ClassVerifier *context, TRAPS) const {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   122
  assert(is_array() && name()->utf8_length() >= 2, "Must be a valid array");
8076
96d498ec7ae1 6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents: 7397
diff changeset
   123
  Symbol* component;
51997
9ce37fa2e179 8209138: Symbol constructor uses u1 as the element type of its name argument
hseigel
parents: 49770
diff changeset
   124
  switch (name()->char_at(1)) {
58722
cba8afa5cfed 8231844: Enhance type signature characters in classfile_constants.h and improve the JVM to use type signature characters more consistently
lfoltan
parents: 58537
diff changeset
   125
    case JVM_SIGNATURE_BOOLEAN: return VerificationType(Boolean);
cba8afa5cfed 8231844: Enhance type signature characters in classfile_constants.h and improve the JVM to use type signature characters more consistently
lfoltan
parents: 58537
diff changeset
   126
    case JVM_SIGNATURE_BYTE:    return VerificationType(Byte);
cba8afa5cfed 8231844: Enhance type signature characters in classfile_constants.h and improve the JVM to use type signature characters more consistently
lfoltan
parents: 58537
diff changeset
   127
    case JVM_SIGNATURE_CHAR:    return VerificationType(Char);
cba8afa5cfed 8231844: Enhance type signature characters in classfile_constants.h and improve the JVM to use type signature characters more consistently
lfoltan
parents: 58537
diff changeset
   128
    case JVM_SIGNATURE_SHORT:   return VerificationType(Short);
cba8afa5cfed 8231844: Enhance type signature characters in classfile_constants.h and improve the JVM to use type signature characters more consistently
lfoltan
parents: 58537
diff changeset
   129
    case JVM_SIGNATURE_INT:     return VerificationType(Integer);
cba8afa5cfed 8231844: Enhance type signature characters in classfile_constants.h and improve the JVM to use type signature characters more consistently
lfoltan
parents: 58537
diff changeset
   130
    case JVM_SIGNATURE_LONG:    return VerificationType(Long);
cba8afa5cfed 8231844: Enhance type signature characters in classfile_constants.h and improve the JVM to use type signature characters more consistently
lfoltan
parents: 58537
diff changeset
   131
    case JVM_SIGNATURE_FLOAT:   return VerificationType(Float);
cba8afa5cfed 8231844: Enhance type signature characters in classfile_constants.h and improve the JVM to use type signature characters more consistently
lfoltan
parents: 58537
diff changeset
   132
    case JVM_SIGNATURE_DOUBLE:  return VerificationType(Double);
cba8afa5cfed 8231844: Enhance type signature characters in classfile_constants.h and improve the JVM to use type signature characters more consistently
lfoltan
parents: 58537
diff changeset
   133
    case JVM_SIGNATURE_ARRAY:
8076
96d498ec7ae1 6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents: 7397
diff changeset
   134
      component = context->create_temporary_symbol(
54847
59ea39bb2809 8223657: Remove unused THREAD argument from SymbolTable functions
coleenp
parents: 53322
diff changeset
   135
        name(), 1, name()->utf8_length());
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   136
      return VerificationType::reference_type(component);
58722
cba8afa5cfed 8231844: Enhance type signature characters in classfile_constants.h and improve the JVM to use type signature characters more consistently
lfoltan
parents: 58537
diff changeset
   137
    case JVM_SIGNATURE_CLASS:
8076
96d498ec7ae1 6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents: 7397
diff changeset
   138
      component = context->create_temporary_symbol(
54847
59ea39bb2809 8223657: Remove unused THREAD argument from SymbolTable functions
coleenp
parents: 53322
diff changeset
   139
        name(), 2, name()->utf8_length() - 1);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   140
      return VerificationType::reference_type(component);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   141
    default:
6172
e1d9c632fa3c 6964170: Verifier crashes
apangin
parents: 5547
diff changeset
   142
      // Met an invalid type signature, e.g. [X
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   143
      return VerificationType::bogus_type();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   144
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   145
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   146
489c9b5090e2 Initial load
duke
parents:
diff changeset
   147
void VerificationType::print_on(outputStream* st) const {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   148
  switch (_u._data) {
13476
471200fb94fd 7116786: RFE: Detailed information on VerifyErrors
kamg
parents: 8921
diff changeset
   149
    case Bogus:            st->print("top"); break;
471200fb94fd 7116786: RFE: Detailed information on VerifyErrors
kamg
parents: 8921
diff changeset
   150
    case Category1:        st->print("category1"); break;
471200fb94fd 7116786: RFE: Detailed information on VerifyErrors
kamg
parents: 8921
diff changeset
   151
    case Category2:        st->print("category2"); break;
471200fb94fd 7116786: RFE: Detailed information on VerifyErrors
kamg
parents: 8921
diff changeset
   152
    case Category2_2nd:    st->print("category2_2nd"); break;
471200fb94fd 7116786: RFE: Detailed information on VerifyErrors
kamg
parents: 8921
diff changeset
   153
    case Boolean:          st->print("boolean"); break;
471200fb94fd 7116786: RFE: Detailed information on VerifyErrors
kamg
parents: 8921
diff changeset
   154
    case Byte:             st->print("byte"); break;
471200fb94fd 7116786: RFE: Detailed information on VerifyErrors
kamg
parents: 8921
diff changeset
   155
    case Short:            st->print("short"); break;
471200fb94fd 7116786: RFE: Detailed information on VerifyErrors
kamg
parents: 8921
diff changeset
   156
    case Char:             st->print("char"); break;
471200fb94fd 7116786: RFE: Detailed information on VerifyErrors
kamg
parents: 8921
diff changeset
   157
    case Integer:          st->print("integer"); break;
471200fb94fd 7116786: RFE: Detailed information on VerifyErrors
kamg
parents: 8921
diff changeset
   158
    case Float:            st->print("float"); break;
471200fb94fd 7116786: RFE: Detailed information on VerifyErrors
kamg
parents: 8921
diff changeset
   159
    case Long:             st->print("long"); break;
471200fb94fd 7116786: RFE: Detailed information on VerifyErrors
kamg
parents: 8921
diff changeset
   160
    case Double:           st->print("double"); break;
471200fb94fd 7116786: RFE: Detailed information on VerifyErrors
kamg
parents: 8921
diff changeset
   161
    case Long_2nd:         st->print("long_2nd"); break;
471200fb94fd 7116786: RFE: Detailed information on VerifyErrors
kamg
parents: 8921
diff changeset
   162
    case Double_2nd:       st->print("double_2nd"); break;
471200fb94fd 7116786: RFE: Detailed information on VerifyErrors
kamg
parents: 8921
diff changeset
   163
    case Null:             st->print("null"); break;
471200fb94fd 7116786: RFE: Detailed information on VerifyErrors
kamg
parents: 8921
diff changeset
   164
    case ReferenceQuery:   st->print("reference type"); break;
471200fb94fd 7116786: RFE: Detailed information on VerifyErrors
kamg
parents: 8921
diff changeset
   165
    case Category1Query:   st->print("category1 type"); break;
471200fb94fd 7116786: RFE: Detailed information on VerifyErrors
kamg
parents: 8921
diff changeset
   166
    case Category2Query:   st->print("category2 type"); break;
471200fb94fd 7116786: RFE: Detailed information on VerifyErrors
kamg
parents: 8921
diff changeset
   167
    case Category2_2ndQuery: st->print("category2_2nd type"); break;
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   168
    default:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   169
      if (is_uninitialized_this()) {
13476
471200fb94fd 7116786: RFE: Detailed information on VerifyErrors
kamg
parents: 8921
diff changeset
   170
        st->print("uninitializedThis");
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   171
      } else if (is_uninitialized()) {
13476
471200fb94fd 7116786: RFE: Detailed information on VerifyErrors
kamg
parents: 8921
diff changeset
   172
        st->print("uninitialized %d", bci());
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   173
      } else {
52190
4e04b7ab20a3 8209087: Clean up runtime code that compares 'this' to NULL
hseigel
parents: 52067
diff changeset
   174
        if (name() != NULL) {
4e04b7ab20a3 8209087: Clean up runtime code that compares 'this' to NULL
hseigel
parents: 52067
diff changeset
   175
          name()->print_value_on(st);
4e04b7ab20a3 8209087: Clean up runtime code that compares 'this' to NULL
hseigel
parents: 52067
diff changeset
   176
        } else {
4e04b7ab20a3 8209087: Clean up runtime code that compares 'this' to NULL
hseigel
parents: 52067
diff changeset
   177
          st->print_cr("NULL");
4e04b7ab20a3 8209087: Clean up runtime code that compares 'this' to NULL
hseigel
parents: 52067
diff changeset
   178
        }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   179
      }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   180
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   181
}