< prev index next > src/hotspot/share/memory/universe.cpp
Print this page
#include "oops/instanceMirrorKlass.hpp"
#include "oops/klass.inline.hpp"
#include "oops/objArrayOop.inline.hpp"
#include "oops/oop.inline.hpp"
#include "oops/oopHandle.inline.hpp"
+ #include "oops/trainingData.hpp"
#include "oops/typeArrayKlass.hpp"
#include "prims/resolvedMethodTable.hpp"
#include "runtime/arguments.hpp"
#include "runtime/atomic.hpp"
#include "runtime/cpuTimeCounters.hpp"
};
static BuiltinException _null_ptr_exception;
static BuiltinException _arithmetic_exception;
static BuiltinException _internal_error;
+ static BuiltinException _array_index_oob_exception;
+ static BuiltinException _array_store_exception;
+ static BuiltinException _class_cast_exception;
objArrayOop Universe::the_empty_class_array () {
return (objArrayOop)_the_empty_class_array.resolve();
}
oop Universe::null_ptr_exception_instance() { return _null_ptr_exception.instance(); }
oop Universe::arithmetic_exception_instance() { return _arithmetic_exception.instance(); }
oop Universe::internal_error_instance() { return _internal_error.instance(); }
+ oop Universe::array_index_oob_exception_instance() { return _array_index_oob_exception.instance(); }
+ oop Universe::array_store_exception_instance() { return _array_store_exception.instance(); }
+ oop Universe::class_cast_exception_instance() { return _class_cast_exception.instance(); }
+
oop Universe::the_null_sentinel() { return _the_null_sentinel.resolve(); }
oop Universe::int_mirror() { return check_mirror(_basic_type_mirrors[T_INT].resolve()); }
oop Universe::float_mirror() { return check_mirror(_basic_type_mirrors[T_FLOAT].resolve()); }
oop Universe::double_mirror() { return check_mirror(_basic_type_mirrors[T_DOUBLE].resolve()); }
void Universe::archive_exception_instances() {
_null_ptr_exception.store_in_cds();
_arithmetic_exception.store_in_cds();
_internal_error.store_in_cds();
+ _array_index_oob_exception.store_in_cds();
+ _array_store_exception.store_in_cds();
+ _class_cast_exception.store_in_cds();
}
void Universe::load_archived_object_instances() {
if (ArchiveHeapLoader::is_in_use()) {
for (int i = T_BOOLEAN; i < T_VOID+1; i++) {
}
_null_ptr_exception.load_from_cds();
_arithmetic_exception.load_from_cds();
_internal_error.load_from_cds();
+ _array_index_oob_exception.load_from_cds();
+ _array_store_exception.load_from_cds();
+ _class_cast_exception.load_from_cds();
}
}
#endif
void Universe::serialize(SerializeClosure* f) {
// updated later in Universe::load_archived_object_instances().
}
_null_ptr_exception.serialize(f);
_arithmetic_exception.serialize(f);
_internal_error.serialize(f);
+ _array_index_oob_exception.serialize(f);
+ _array_store_exception.serialize(f);
+ _class_cast_exception.serialize(f);
#endif
f->do_ptr(&_fillerArrayKlass);
for (int i = 0; i < T_LONG+1; i++) {
f->do_ptr(&_typeArrayKlasses[i]);
// Setup preallocated NullPointerException/ArithmeticException
// (used for a cheap & dirty solution in compiler exception handling)
_null_ptr_exception.init_if_empty(vmSymbols::java_lang_NullPointerException(), CHECK_false);
_arithmetic_exception.init_if_empty(vmSymbols::java_lang_ArithmeticException(), CHECK_false);
+ _array_index_oob_exception.init_if_empty(vmSymbols::java_lang_ArrayIndexOutOfBoundsException(), CHECK_false);
+ _array_store_exception.init_if_empty(vmSymbols::java_lang_ArrayStoreException(), CHECK_false);
+ _class_cast_exception.init_if_empty(vmSymbols::java_lang_ClassCastException(), CHECK_false);
// Virtual Machine Error for when we get into a situation we can't resolve
Klass* k = vmClasses::InternalError_klass();
bool linked = InstanceKlass::cast(k)->link_class_or_fail(CHECK_false);
if (!linked) {
< prev index next >