equal
deleted
inserted
replaced
122 // Note: no handle for klass needed since they are not used |
122 // Note: no handle for klass needed since they are not used |
123 // anymore after new_objArray() and no GC can happen before. |
123 // anymore after new_objArray() and no GC can happen before. |
124 // (This may have to change if this code changes!) |
124 // (This may have to change if this code changes!) |
125 assert(array_klass->is_klass(), "not a class"); |
125 assert(array_klass->is_klass(), "not a class"); |
126 oop obj; |
126 oop obj; |
127 if (array_klass->oop_is_typeArray()) { |
127 if (array_klass->is_typeArray_klass()) { |
128 BasicType elt_type = TypeArrayKlass::cast(array_klass)->element_type(); |
128 BasicType elt_type = TypeArrayKlass::cast(array_klass)->element_type(); |
129 obj = oopFactory::new_typeArray(elt_type, length, CHECK); |
129 obj = oopFactory::new_typeArray(elt_type, length, CHECK); |
130 } else { |
130 } else { |
131 Klass* elem_klass = ObjArrayKlass::cast(array_klass)->element_klass(); |
131 Klass* elem_klass = ObjArrayKlass::cast(array_klass)->element_klass(); |
132 obj = oopFactory::new_objArray(elem_klass, length, CHECK); |
132 obj = oopFactory::new_objArray(elem_klass, length, CHECK); |