< prev index next >
src/share/vm/opto/runtime.cpp
Print this page
@@ -99,10 +99,11 @@
address OptoRuntime::_vtable_must_compile_Java = NULL;
address OptoRuntime::_complete_monitor_locking_Java = NULL;
address OptoRuntime::_monitor_notify_Java = NULL;
address OptoRuntime::_monitor_notifyAll_Java = NULL;
address OptoRuntime::_rethrow_Java = NULL;
+address OptoRuntime::_array_out_of_bounds_Java = NULL;
address OptoRuntime::_slow_arraycopy_Java = NULL;
address OptoRuntime::_register_finalizer_Java = NULL;
ExceptionBlob* OptoRuntime::_exception_blob;
@@ -144,10 +145,11 @@
gen(env, _g1_wb_post_Java , g1_wb_post_Type , SharedRuntime::g1_wb_post , 0 , false, false, false);
gen(env, _complete_monitor_locking_Java , complete_monitor_enter_Type , SharedRuntime::complete_monitor_locking_C, 0, false, false, false);
gen(env, _monitor_notify_Java , monitor_notify_Type , monitor_notify_C , 0 , false, false, false);
gen(env, _monitor_notifyAll_Java , monitor_notify_Type , monitor_notifyAll_C , 0 , false, false, false);
gen(env, _rethrow_Java , rethrow_Type , rethrow_C , 2 , true , false, true );
+ gen(env, _array_out_of_bounds_Java , array_out_of_bounds_Type , array_out_of_bounds , 0 , false, false, false);
gen(env, _slow_arraycopy_Java , slow_arraycopy_Type , SharedRuntime::slow_arraycopy_C , 0 , false, false, false);
gen(env, _register_finalizer_Java , register_finalizer_Type , register_finalizer , 0 , false, false, false);
return true;
@@ -426,10 +428,14 @@
oop obj = ArrayKlass::cast(elem_type)->multi_allocate(len, c_dims, THREAD);
deoptimize_caller_frame(thread, HAS_PENDING_EXCEPTION);
thread->set_vm_result(obj);
JRT_END
+JRT_ENTRY(void, OptoRuntime::array_out_of_bounds(int index, int length, JavaThread *thread))
+ fatal("Array index out of bounds: index = %d, length = %d", index, length);
+JRT_END
+
JRT_BLOCK_ENTRY(void, OptoRuntime::monitor_notify_C(oopDesc* obj, JavaThread *thread))
// Very few notify/notifyAll operations find any threads on the waitset, so
// the dominant fast-path is to simply return.
// Relatedly, it's critical that notify/notifyAll be fast in order to
@@ -598,10 +604,24 @@
// create result type (range)
fields = TypeTuple::fields(0);
const TypeTuple *range = TypeTuple::make(TypeFunc::Parms+0, fields);
+ return TypeFunc::make(domain, range);
+}
+
+const TypeFunc *OptoRuntime::array_out_of_bounds_Type() {
+ // create input type (domain)
+ const Type **fields = TypeTuple::fields(2);
+ fields[TypeFunc::Parms+0] = TypeInt::INT; // index
+ fields[TypeFunc::Parms+1] = TypeInt::INT; // length
+ const TypeTuple *domain = TypeTuple::make(TypeFunc::Parms+2, fields);
+
+ // create result type (range)
+ fields = TypeTuple::fields(0);
+ const TypeTuple *range = TypeTuple::make(TypeFunc::Parms+0, fields);
+
return TypeFunc::make(domain, range);
}
//-----------------------------------------------------------------------------
// Monitor Handling
< prev index next >