src/hotspot/share/runtime/fieldType.hpp
changeset 58722 cba8afa5cfed
parent 53244 9807daeb47c4
equal deleted inserted replaced
58720:ae0af9fb3dbb 58722:cba8afa5cfed
    56 
    56 
    57   // Return basic type
    57   // Return basic type
    58   static BasicType basic_type(Symbol* signature);
    58   static BasicType basic_type(Symbol* signature);
    59 
    59 
    60   // Testing
    60   // Testing
    61   static bool is_array(Symbol* signature) { return signature->utf8_length() > 1 && signature->char_at(0) == '[' && is_valid_array_signature(signature); }
    61   static bool is_array(Symbol* signature) { return signature->utf8_length() > 1 &&
       
    62                                                    signature->char_at(0) == JVM_SIGNATURE_ARRAY &&
       
    63                                                    is_valid_array_signature(signature); }
    62 
    64 
    63   static bool is_obj(Symbol* signature) {
    65   static bool is_obj(Symbol* signature) {
    64      int sig_length = signature->utf8_length();
    66      int sig_length = signature->utf8_length();
    65      // Must start with 'L' and end with ';'
    67      // Must start with 'L' and end with ';'
    66      return (sig_length >= 2 &&
    68      return (sig_length >= 2 &&
    67              (signature->char_at(0) == 'L') &&
    69              (signature->char_at(0) == JVM_SIGNATURE_CLASS) &&
    68              (signature->char_at(sig_length - 1) == ';'));
    70              (signature->char_at(sig_length - 1) == JVM_SIGNATURE_ENDCLASS));
    69   }
    71   }
    70 
    72 
    71   // Parse field and extract array information. Works for T_ARRAY only.
    73   // Parse field and extract array information. Works for T_ARRAY only.
    72   static BasicType get_array_info(Symbol* signature, FieldArrayInfo& ai, TRAPS);
    74   static BasicType get_array_info(Symbol* signature, FieldArrayInfo& ai, TRAPS);
    73 };
    75 };