< prev index next >

src/hotspot/share/runtime/fieldType.cpp

Print this page

        

*** 56,74 **** case 'J': // T_LONG case 'S': // T_SHORT case 'Z': // T_BOOLEAN // If it is an array, the type is the last character return (i + 1 == len); case 'L': ! // If it is an object, the last character must be a ';' return sig->char_at(len - 1) == ';'; } return false; } - BasicType FieldType::get_array_info(Symbol* signature, FieldArrayInfo& fd, TRAPS) { assert(basic_type(signature) == T_ARRAY, "must be array"); int index = 1; int dim = 1; while (signature->char_at(index) == '[') { --- 56,74 ---- case 'J': // T_LONG case 'S': // T_SHORT case 'Z': // T_BOOLEAN // If it is an array, the type is the last character return (i + 1 == len); + case 'Q': // fall through case 'L': ! // If it is a class name, the last character must be a ';' return sig->char_at(len - 1) == ';'; } return false; } BasicType FieldType::get_array_info(Symbol* signature, FieldArrayInfo& fd, TRAPS) { assert(basic_type(signature) == T_ARRAY, "must be array"); int index = 1; int dim = 1; while (signature->char_at(index) == '[') {
*** 76,90 **** dim++; } ResourceMark rm; char *element = signature->as_C_string() + index; BasicType element_type = char2type(element[0]); ! if (element_type == T_OBJECT) { int len = (int)strlen(element); assert(element[len-1] == ';', "last char should be a semicolon"); element[len-1] = '\0'; // chop off semicolon fd._object_key = SymbolTable::new_symbol(element + 1); } // Pass dimension back to caller fd._dimension = dim; return element_type; } --- 76,95 ---- dim++; } ResourceMark rm; char *element = signature->as_C_string() + index; BasicType element_type = char2type(element[0]); ! if (element_type == T_OBJECT || element_type == T_VALUETYPE) { int len = (int)strlen(element); assert(element[len-1] == ';', "last char should be a semicolon"); element[len-1] = '\0'; // chop off semicolon fd._object_key = SymbolTable::new_symbol(element + 1); } // Pass dimension back to caller fd._dimension = dim; + fd._storage_props = get_array_storage_properties(signature); return element_type; } + + ArrayStorageProperties FieldType::get_array_storage_properties(Symbol* signature) { + return (signature->is_Q_array_signature() || signature->is_Q_signature()) ? ArrayStorageProperties::flattened_and_null_free : ArrayStorageProperties::empty; + }
< prev index next >