comparison src/share/vm/opto/memnode.cpp @ 13442:b87211e33ebb

8029366: ShouldNotReachHere error when creating an array with component type of void Reviewed-by: kvn
author twisti
date Fri, 06 Dec 2013 16:43:56 -0800
parents 884ed7a10f09
children de6a9e811145 5da8bb64b370
comparison
equal deleted inserted replaced
13441:df832bd8edb9 13442:b87211e33ebb
2069 ciType* t = tinst->java_mirror_type(); 2069 ciType* t = tinst->java_mirror_type();
2070 // java_mirror_type returns non-null for compile-time Class constants. 2070 // java_mirror_type returns non-null for compile-time Class constants.
2071 if (t != NULL) { 2071 if (t != NULL) {
2072 // constant oop => constant klass 2072 // constant oop => constant klass
2073 if (offset == java_lang_Class::array_klass_offset_in_bytes()) { 2073 if (offset == java_lang_Class::array_klass_offset_in_bytes()) {
2074 if (t->is_void()) {
2075 // We cannot create a void array. Since void is a primitive type return null
2076 // klass. Users of this result need to do a null check on the returned klass.
2077 return TypePtr::NULL_PTR;
2078 }
2074 return TypeKlassPtr::make(ciArrayKlass::make(t)); 2079 return TypeKlassPtr::make(ciArrayKlass::make(t));
2075 } 2080 }
2076 if (!t->is_klass()) { 2081 if (!t->is_klass()) {
2077 // a primitive Class (e.g., int.class) has NULL for a klass field 2082 // a primitive Class (e.g., int.class) has NULL for a klass field
2078 return TypePtr::NULL_PTR; 2083 return TypePtr::NULL_PTR;