< prev index next >

src/hotspot/share/oops/typeArrayKlass.cpp

Print this page

211       return this;
212 
213   // lock-free read needs acquire semantics
214   if (higher_dimension_acquire() == NULL) {
215     return NULL;
216   }
217 
218   ObjArrayKlass* h_ak = ObjArrayKlass::cast(higher_dimension());
219   return h_ak->array_klass_or_null(n);
220 }
221 
222 Klass* TypeArrayKlass::array_klass(TRAPS) {
223   return array_klass(dimension() +  1, THREAD);
224 }
225 
226 Klass* TypeArrayKlass::array_klass_or_null() {
227   return array_klass_or_null(dimension() +  1);
228 }
229 
230 size_t TypeArrayKlass::oop_size(oop obj) const {
231   assert(obj->is_typeArray(),"must be a type array");
232   typeArrayOop t = typeArrayOop(obj);
233   return t->object_size(this);
234 }
235 
236 void TypeArrayKlass::initialize(TRAPS) {
237   // Nothing to do. Having this function is handy since objArrayKlasses can be
238   // initialized by calling initialize on their bottom_klass, see ObjArrayKlass::initialize
239 }
240 
241 const char* TypeArrayKlass::external_name(BasicType type) {
242   switch (type) {
243     case T_BOOLEAN: return "[Z";
244     case T_CHAR:    return "[C";
245     case T_FLOAT:   return "[F";
246     case T_DOUBLE:  return "[D";
247     case T_BYTE:    return "[B";
248     case T_SHORT:   return "[S";
249     case T_INT:     return "[I";
250     case T_LONG:    return "[J";
251     default: ShouldNotReachHere();

211       return this;
212 
213   // lock-free read needs acquire semantics
214   if (higher_dimension_acquire() == NULL) {
215     return NULL;
216   }
217 
218   ObjArrayKlass* h_ak = ObjArrayKlass::cast(higher_dimension());
219   return h_ak->array_klass_or_null(n);
220 }
221 
222 Klass* TypeArrayKlass::array_klass(TRAPS) {
223   return array_klass(dimension() +  1, THREAD);
224 }
225 
226 Klass* TypeArrayKlass::array_klass_or_null() {
227   return array_klass_or_null(dimension() +  1);
228 }
229 
230 size_t TypeArrayKlass::oop_size(oop obj) const {

231   typeArrayOop t = typeArrayOop(obj);
232   return t->object_size(this);
233 }
234 
235 void TypeArrayKlass::initialize(TRAPS) {
236   // Nothing to do. Having this function is handy since objArrayKlasses can be
237   // initialized by calling initialize on their bottom_klass, see ObjArrayKlass::initialize
238 }
239 
240 const char* TypeArrayKlass::external_name(BasicType type) {
241   switch (type) {
242     case T_BOOLEAN: return "[Z";
243     case T_CHAR:    return "[C";
244     case T_FLOAT:   return "[F";
245     case T_DOUBLE:  return "[D";
246     case T_BYTE:    return "[B";
247     case T_SHORT:   return "[S";
248     case T_INT:     return "[I";
249     case T_LONG:    return "[J";
250     default: ShouldNotReachHere();
< prev index next >