equal
deleted
inserted
replaced
326 int dim = dimension(); |
326 int dim = dimension(); |
327 if (dim == n) return this; |
327 if (dim == n) return this; |
328 |
328 |
329 // lock-free read needs acquire semantics |
329 // lock-free read needs acquire semantics |
330 if (higher_dimension_acquire() == NULL) { |
330 if (higher_dimension_acquire() == NULL) { |
331 if (or_null) return NULL; |
331 if (or_null) return NULL; |
332 |
332 |
333 ResourceMark rm; |
333 ResourceMark rm; |
334 JavaThread *jt = (JavaThread *)THREAD; |
334 JavaThread *jt = (JavaThread *)THREAD; |
335 { |
335 { |
336 // Ensure atomic creation of higher dimensions |
336 // Ensure atomic creation of higher dimensions |
347 // use 'release' to pair with lock-free load |
347 // use 'release' to pair with lock-free load |
348 release_set_higher_dimension(ak); |
348 release_set_higher_dimension(ak); |
349 assert(ak->is_objArray_klass(), "incorrect initialization of ObjArrayKlass"); |
349 assert(ak->is_objArray_klass(), "incorrect initialization of ObjArrayKlass"); |
350 } |
350 } |
351 } |
351 } |
352 } else { |
|
353 CHECK_UNHANDLED_OOPS_ONLY(Thread::current()->clear_unhandled_oops()); |
|
354 } |
352 } |
355 |
353 |
356 ObjArrayKlass *ak = ObjArrayKlass::cast(higher_dimension()); |
354 ObjArrayKlass *ak = ObjArrayKlass::cast(higher_dimension()); |
357 if (or_null) { |
355 if (or_null) { |
358 return ak->array_klass_or_null(n); |
356 return ak->array_klass_or_null(n); |
359 } |
357 } |
|
358 THREAD->check_possible_safepoint(); |
360 return ak->array_klass(n, THREAD); |
359 return ak->array_klass(n, THREAD); |
361 } |
360 } |
362 |
361 |
363 Klass* ObjArrayKlass::array_klass_impl(bool or_null, TRAPS) { |
362 Klass* ObjArrayKlass::array_klass_impl(bool or_null, TRAPS) { |
364 return array_klass_impl(or_null, dimension() + 1, THREAD); |
363 return array_klass_impl(or_null, dimension() + 1, THREAD); |