1.1 --- a/src/share/vm/utilities/exceptions.cpp Thu Jan 27 13:42:28 2011 -0800 1.2 +++ b/src/share/vm/utilities/exceptions.cpp Thu Jan 27 16:11:27 2011 -0800 1.3 @@ -102,10 +102,10 @@ 1.4 return false; 1.5 } 1.6 1.7 -bool Exceptions::special_exception(Thread* thread, const char* file, int line, symbolHandle h_name, const char* message) { 1.8 +bool Exceptions::special_exception(Thread* thread, const char* file, int line, Symbol* h_name, const char* message) { 1.9 // bootstrapping check 1.10 if (!Universe::is_fully_initialized()) { 1.11 - if (h_name.is_null()) { 1.12 + if (h_name == NULL) { 1.13 // atleast an informative message. 1.14 vm_exit_during_initialization("Exception", message); 1.15 } else { 1.16 @@ -161,7 +161,7 @@ 1.17 } 1.18 1.19 1.20 -void Exceptions::_throw_msg(Thread* thread, const char* file, int line, symbolHandle h_name, const char* message, Handle h_loader, Handle h_protection_domain) { 1.21 +void Exceptions::_throw_msg(Thread* thread, const char* file, int line, Symbol* h_name, const char* message, Handle h_loader, Handle h_protection_domain) { 1.22 // Check for special boot-strapping/vm-thread handling 1.23 if (special_exception(thread, file, line, h_name, message)) return; 1.24 // Create and throw exception 1.25 @@ -171,7 +171,7 @@ 1.26 } 1.27 1.28 // Throw an exception with a message and a cause 1.29 -void Exceptions::_throw_msg_cause(Thread* thread, const char* file, int line, symbolHandle h_name, const char* message, Handle h_cause, Handle h_loader, Handle h_protection_domain) { 1.30 +void Exceptions::_throw_msg_cause(Thread* thread, const char* file, int line, Symbol* h_name, const char* message, Handle h_cause, Handle h_loader, Handle h_protection_domain) { 1.31 // Check for special boot-strapping/vm-thread handling 1.32 if (special_exception(thread, file, line, h_name, message)) return; 1.33 // Create and throw exception and init cause 1.34 @@ -179,18 +179,9 @@ 1.35 _throw(thread, file, line, h_exception, message); 1.36 } 1.37 1.38 -// This version creates handles and calls the other version 1.39 -void Exceptions::_throw_msg(Thread* thread, const char* file, int line, 1.40 - symbolOop name, const char* message) { 1.41 - symbolHandle h_name(thread, name); 1.42 - Handle h_loader(thread, NULL); 1.43 - Handle h_protection_domain(thread, NULL); 1.44 - Exceptions::_throw_msg(thread, file, line, h_name, message, h_loader, h_protection_domain); 1.45 -} 1.46 - 1.47 // This version already has a handle for name 1.48 void Exceptions::_throw_msg(Thread* thread, const char* file, int line, 1.49 - symbolHandle name, const char* message) { 1.50 + Symbol* name, const char* message) { 1.51 Handle h_loader(thread, NULL); 1.52 Handle h_protection_domain(thread, NULL); 1.53 Exceptions::_throw_msg(thread, file, line, name, message, h_loader, h_protection_domain); 1.54 @@ -198,13 +189,13 @@ 1.55 1.56 // This version already has a handle for name 1.57 void Exceptions::_throw_msg_cause(Thread* thread, const char* file, int line, 1.58 - symbolHandle name, const char* message, Handle cause) { 1.59 + Symbol* name, const char* message, Handle cause) { 1.60 Handle h_loader(thread, NULL); 1.61 Handle h_protection_domain(thread, NULL); 1.62 Exceptions::_throw_msg_cause(thread, file, line, name, message, cause, h_loader, h_protection_domain); 1.63 } 1.64 1.65 -void Exceptions::_throw_args(Thread* thread, const char* file, int line, symbolHandle h_name, symbolHandle h_signature, JavaCallArguments *args) { 1.66 +void Exceptions::_throw_args(Thread* thread, const char* file, int line, Symbol* h_name, Symbol* h_signature, JavaCallArguments *args) { 1.67 // Check for special boot-strapping/vm-thread handling 1.68 if (special_exception(thread, file, line, h_name, NULL)) return; 1.69 // Create and throw exception 1.70 @@ -233,7 +224,7 @@ 1.71 _throw_oop(THREAD, file, line, exception()); 1.72 } 1.73 1.74 -void Exceptions::fthrow(Thread* thread, const char* file, int line, symbolHandle h_name, const char* format, ...) { 1.75 +void Exceptions::fthrow(Thread* thread, const char* file, int line, Symbol* h_name, const char* format, ...) { 1.76 const int max_msg_size = 1024; 1.77 va_list ap; 1.78 va_start(ap, format); 1.79 @@ -247,8 +238,8 @@ 1.80 // Creates an exception oop, calls the <init> method with the given signature. 1.81 // and returns a Handle 1.82 // Initializes the cause if cause non-null 1.83 -Handle Exceptions::new_exception(Thread *thread, symbolHandle h_name, 1.84 - symbolHandle signature, 1.85 +Handle Exceptions::new_exception(Thread *thread, Symbol* h_name, 1.86 + Symbol* signature, 1.87 JavaCallArguments *args, 1.88 Handle h_cause, Handle h_loader, 1.89 Handle h_protection_domain) { 1.90 @@ -275,7 +266,7 @@ 1.91 args->set_receiver(h_exception); 1.92 // Call constructor 1.93 JavaCalls::call_special(&result, klass, 1.94 - vmSymbolHandles::object_initializer_name(), 1.95 + vmSymbols::object_initializer_name(), 1.96 signature, 1.97 args, 1.98 thread); 1.99 @@ -292,8 +283,8 @@ 1.100 args1.set_receiver(h_exception); 1.101 args1.push_oop(h_cause); 1.102 JavaCalls::call_virtual(&result1, klass, 1.103 - vmSymbolHandles::initCause_name(), 1.104 - vmSymbolHandles::throwable_throwable_signature(), 1.105 + vmSymbols::initCause_name(), 1.106 + vmSymbols::throwable_throwable_signature(), 1.107 &args1, 1.108 thread); 1.109 } 1.110 @@ -309,15 +300,15 @@ 1.111 1.112 // Convenience method. Calls either the <init>() or <init>(String) method when 1.113 // creating a new exception 1.114 -Handle Exceptions::new_exception(Thread* thread, symbolHandle h_name, 1.115 +Handle Exceptions::new_exception(Thread* thread, Symbol* h_name, 1.116 const char* message, Handle h_cause, 1.117 Handle h_loader, 1.118 Handle h_protection_domain, 1.119 ExceptionMsgToUtf8Mode to_utf8_safe) { 1.120 JavaCallArguments args; 1.121 - symbolHandle signature; 1.122 + Symbol* signature = NULL; 1.123 if (message == NULL) { 1.124 - signature = vmSymbolHandles::void_method_signature(); 1.125 + signature = vmSymbols::void_method_signature(); 1.126 } else { 1.127 // We want to allocate storage, but we can't do that if there's 1.128 // a pending exception, so we preserve any pending exception 1.129 @@ -348,7 +339,7 @@ 1.130 return incoming_exception; 1.131 } 1.132 args.push_oop(msg); 1.133 - signature = vmSymbolHandles::string_void_signature(); 1.134 + signature = vmSymbols::string_void_signature(); 1.135 } 1.136 return new_exception(thread, h_name, signature, &args, h_cause, h_loader, h_protection_domain); 1.137 } 1.138 @@ -362,15 +353,14 @@ 1.139 // point is to push this flag down to class java_lang_String since other 1.140 // classes may need similar functionalities. 1.141 Handle Exceptions::new_exception(Thread* thread, 1.142 - symbolOop name, 1.143 + Symbol* name, 1.144 const char* message, 1.145 ExceptionMsgToUtf8Mode to_utf8_safe) { 1.146 1.147 - symbolHandle h_name(thread, name); 1.148 Handle h_loader(thread, NULL); 1.149 Handle h_prot(thread, NULL); 1.150 Handle h_cause(thread, NULL); 1.151 - return Exceptions::new_exception(thread, h_name, message, h_cause, h_loader, 1.152 + return Exceptions::new_exception(thread, name, message, h_cause, h_loader, 1.153 h_prot, to_utf8_safe); 1.154 } 1.155