/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#include "precompiled.hpp"
#include "classfile/systemDictionary.hpp"
#include "classfile/vmSymbols.hpp"
#include "gc_implementation/shared/markSweep.inline.hpp"
#include "gc_interface/collectedHeap.inline.hpp"
#include "memory/genOopClosures.inline.hpp"
#include "memory/resourceArea.hpp"
#include "memory/universe.inline.hpp"
#include "oops/instanceKlass.hpp"
#include "oops/objArrayKlass.hpp"
#include "oops/objArrayKlass.inline.hpp"
#include "oops/objArrayKlassKlass.hpp"
#include "oops/objArrayOop.hpp"
#include "oops/oop.inline.hpp"
#include "oops/oop.inline2.hpp"
#include "oops/symbol.hpp"
#include "runtime/handles.inline.hpp"
#include "runtime/mutexLocker.hpp"
#ifndef SERIALGC
#include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
#include "gc_implementation/g1/g1OopClosures.inline.hpp"
#include "gc_implementation/g1/g1RemSet.inline.hpp"
#include "gc_implementation/g1/heapRegionSeq.inline.hpp"
#include "gc_implementation/parNew/parOopClosures.inline.hpp"
#include "oops/oop.pcgc.inline.hpp"
#endif
}
if (length >= 0) {
return a;
} else {
report_java_out_of_memory("Requested array size exceeds VM limit");
}
} else {
}
}
static int multi_alloc_counter = 0;
// Call to lower_dimension uses this pointer, so most be called before a
// possible GC
// If length < 0 allocate will throw an exception.
if (rank > 1) {
if (length != 0) {
}
} else {
// Since this array dimension has zero length, nothing will be
// allocated, however the lower dimension values must be checked
// for illegal values.
for (int i = 0; i < rank - 1; ++i) {
sizes += 1;
if (*sizes < 0) {
}
}
}
}
return h_array();
}
// Either oop or narrowOop depending on UseCompressedOops.
// For performance reasons, we assume we are that the write barrier we
// are using has optimized modes for arrays of references. At least one
// of the asserts below will fail if this is not the case.
if (s == d) {
// since source and destination are equal we do not need conversion checks.
} else {
// We have to make sure all elements conform to the destination array
// elements are guaranteed to be subtypes, so no check necessary
} else {
// slow case: need individual subtype checks
// note: don't use obj_at_put below because it includes a redundant store check
// XXX this is going to be slow.
// even slower now
if (element_is_null ||
*p = *from;
} else {
// We must do a barrier to cover the partial copy.
// pointer delta is scaled to number of elements (length field in
// objArrayOop) which we assume is 32 bit.
return;
}
}
}
}
}
if (!d->is_objArray()) {
}
// Check is all offsets and lengths are non negative
}
// Check if the ranges are valid
}
// Special case. Boundary cases must be checked first
// This allows the following call: copy_array(s, s.length(), d.length(), 0).
// This is correct, since the position is supposed to be an 'in between point', i.e., s.length(),
// points to the right of the last element.
if (length==0) {
return;
}
if (UseCompressedOops) {
} else {
}
}
}
klassOop objArrayKlass::array_klass_impl(objArrayKlassHandle this_oop, bool or_null, int n, TRAPS) {
if (dimension == n)
return this_oop();
{
// Ensure atomic creation of higher dimensions
// Check if another thread beat us
// Create multi-dim klass object and link them together
}
}
} else {
}
if (or_null) {
return ak->array_klass_or_null(n);
}
}
}
// array of interfaces
return false;
else
return Klass::can_be_primary_super_slow();
}
// interfaces = { cloneable_klass, serializable_klass, elemSuper[], ... };
if (num_secondaries == 2) {
// Must share this for correct bootstrapping!
return Universe::the_array_interfaces_array();
} else {
for (int i = 0; i < num_elem_supers; i++) {
}
return secondaries();
}
}
if (!k->klass_part()->oop_is_objArray())
return arrayKlass::compute_is_subtype_of(k);
}
Klass::cast(bottom_klass())->initialize(THREAD); // dispatches to either instanceKlass or typeArrayKlass
}
{ \
T* p = (T*)(a)->base(); \
while (p < end) { \
do_oop; \
p++; \
} \
}
{ \
T* const l = (T*)(low); \
T* const h = (T*)(high); \
T* p = (T*)(a)->base(); \
if (p < l) p = l; \
while (p < end) { \
do_oop; \
++p; \
} \
}
if (UseCompressedOops) { \
a, p, do_oop) \
} else { \
a, p, do_oop) \
}
if (UseCompressedOops) { \
} else { \
}
if (UseCompressedOops) {
} else {
}
}
#ifndef SERIALGC
if (UseCompressedOops) {
} else {
}
}
#endif // SERIALGC
\
OopClosureType* closure) { \
/* Get size before changing pointers. */ \
/* Don't call size() or oop_size() since that is a virtual call. */ \
int size = a->object_size(); \
a->oop_iterate_header(closure); \
} \
return size; \
}
\
/* Get size before changing pointers. */ \
/* Don't call size() or oop_size() since that is a virtual call */ \
int size = a->object_size(); \
} \
return size; \
}
// Like oop_oop_iterate but only iterates over a specified range and only used
// for objArrayOops.
\
/* Get size before changing pointers. */ \
/* Don't call size() or oop_size() since that is a virtual call */ \
int size = a->object_size(); \
if (UseCompressedOops) { \
/* this might be wierd if end needs to be aligned on HeapWord boundary */ \
} \
} else { \
} \
} \
return size; \
}
// Get size before changing pointers.
// Don't call size() or oop_size() since that is a virtual call.
a->adjust_header();
return size;
}
#ifndef SERIALGC
objArrayOop(obj), p, \
if (PSScavenge::should_scavenge(p)) { \
pm->claim_or_forward_depth(p); \
})
}
return a->object_size();
}
#endif // SERIALGC
// JVM support
// The modifier for an objectArray is the same as its element
if (element_klass() == NULL) {
}
// Return the flags of the bottom element type.
| (JVM_ACC_ABSTRACT | JVM_ACC_FINAL);
}
#ifndef PRODUCT
// Printing
}
if (remaining > 0) {
}
}
#endif //PRODUCT
for (int i = 0; i < len; i++) {
if (i > max_objArray_print_length) {
}
}
}
}
return external_name();
}
// Verification
}
}