equal
deleted
inserted
replaced
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; |