8003310: Enable -Wunused-function when compiling with gcc

Add the -Wunused-function flag and remove a number of unused functions.

Reviewed-by: dholmes, coleenp, kvn
This commit is contained in:
Mikael Vidstedt 2013-04-04 10:01:26 -07:00
parent 33f6dd2215
commit eeb83733a6
29 changed files with 92 additions and 266 deletions

View file

@ -1289,32 +1289,6 @@ enum JNICallType {
JNI_NONVIRTUAL
};
static methodHandle jni_resolve_interface_call(Handle recv, methodHandle method, TRAPS) {
assert(!method.is_null() , "method should not be null");
KlassHandle recv_klass; // Default to NULL (use of ?: can confuse gcc)
if (recv.not_null()) recv_klass = KlassHandle(THREAD, recv->klass());
KlassHandle spec_klass (THREAD, method->method_holder());
Symbol* name = method->name();
Symbol* signature = method->signature();
CallInfo info;
LinkResolver::resolve_interface_call(info, recv, recv_klass, spec_klass, name, signature, KlassHandle(), false, true, CHECK_(methodHandle()));
return info.selected_method();
}
static methodHandle jni_resolve_virtual_call(Handle recv, methodHandle method, TRAPS) {
assert(!method.is_null() , "method should not be null");
KlassHandle recv_klass; // Default to NULL (use of ?: can confuse gcc)
if (recv.not_null()) recv_klass = KlassHandle(THREAD, recv->klass());
KlassHandle spec_klass (THREAD, method->method_holder());
Symbol* name = method->name();
Symbol* signature = method->signature();
CallInfo info;
LinkResolver::resolve_virtual_call(info, recv, recv_klass, spec_klass, name, signature, KlassHandle(), false, true, CHECK_(methodHandle()));
return info.selected_method();
}
static void jni_invoke_static(JNIEnv *env, JavaValue* result, jobject receiver, JNICallType call_type, jmethodID method_id, JNI_ArgumentPusher *args, TRAPS) {
@ -5053,6 +5027,7 @@ _JNI_IMPORT_OR_EXPORT_ jint JNICALL JNI_GetDefaultJavaVMInitArgs(void *args_) {
void execute_internal_vm_tests() {
if (ExecuteInternalVMTests) {
tty->print_cr("Running internal VM tests");
run_unit_test(GlobalDefinitions::test_globals());
run_unit_test(arrayOopDesc::test_max_array_length());
run_unit_test(CollectedHeap::test_is_in());
run_unit_test(QuickSort::test_quick_sort());