Mercurial > hg > truffle
diff src/share/vm/utilities/exceptions.cpp @ 2181:d25d4ca69222
Merge.
author | Thomas Wuerthinger <wuerthinger@ssw.jku.at> |
---|---|
date | Wed, 16 Feb 2011 13:47:20 +0100 |
parents | 06f017f7daa7 3582bf76420e |
children | 0654ee04b214 |
line wrap: on
line diff
--- a/src/share/vm/utilities/exceptions.cpp Wed Feb 16 13:38:33 2011 +0100 +++ b/src/share/vm/utilities/exceptions.cpp Wed Feb 16 13:47:20 2011 +0100 @@ -103,10 +103,10 @@ return false; } -bool Exceptions::special_exception(Thread* thread, const char* file, int line, symbolHandle h_name, const char* message) { +bool Exceptions::special_exception(Thread* thread, const char* file, int line, Symbol* h_name, const char* message) { // bootstrapping check if (!Universe::is_fully_initialized()) { - if (h_name.is_null()) { + if (h_name == NULL) { // atleast an informative message. vm_exit_during_initialization("Exception", message); } else { @@ -163,7 +163,7 @@ } -void Exceptions::_throw_msg(Thread* thread, const char* file, int line, symbolHandle h_name, const char* message, Handle h_loader, Handle h_protection_domain) { +void Exceptions::_throw_msg(Thread* thread, const char* file, int line, Symbol* h_name, const char* message, Handle h_loader, Handle h_protection_domain) { // Check for special boot-strapping/vm-thread handling if (special_exception(thread, file, line, h_name, message)) return; // Create and throw exception @@ -173,7 +173,7 @@ } // Throw an exception with a message and a cause -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) { +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) { // Check for special boot-strapping/vm-thread handling if (special_exception(thread, file, line, h_name, message)) return; // Create and throw exception and init cause @@ -181,18 +181,9 @@ _throw(thread, file, line, h_exception, message); } -// This version creates handles and calls the other version -void Exceptions::_throw_msg(Thread* thread, const char* file, int line, - symbolOop name, const char* message) { - symbolHandle h_name(thread, name); - Handle h_loader(thread, NULL); - Handle h_protection_domain(thread, NULL); - Exceptions::_throw_msg(thread, file, line, h_name, message, h_loader, h_protection_domain); -} - // This version already has a handle for name void Exceptions::_throw_msg(Thread* thread, const char* file, int line, - symbolHandle name, const char* message) { + Symbol* name, const char* message) { Handle h_loader(thread, NULL); Handle h_protection_domain(thread, NULL); Exceptions::_throw_msg(thread, file, line, name, message, h_loader, h_protection_domain); @@ -200,13 +191,13 @@ // This version already has a handle for name void Exceptions::_throw_msg_cause(Thread* thread, const char* file, int line, - symbolHandle name, const char* message, Handle cause) { + Symbol* name, const char* message, Handle cause) { Handle h_loader(thread, NULL); Handle h_protection_domain(thread, NULL); Exceptions::_throw_msg_cause(thread, file, line, name, message, cause, h_loader, h_protection_domain); } -void Exceptions::_throw_args(Thread* thread, const char* file, int line, symbolHandle h_name, symbolHandle h_signature, JavaCallArguments *args) { +void Exceptions::_throw_args(Thread* thread, const char* file, int line, Symbol* h_name, Symbol* h_signature, JavaCallArguments *args) { // Check for special boot-strapping/vm-thread handling if (special_exception(thread, file, line, h_name, NULL)) return; // Create and throw exception @@ -235,7 +226,7 @@ _throw_oop(THREAD, file, line, exception()); } -void Exceptions::fthrow(Thread* thread, const char* file, int line, symbolHandle h_name, const char* format, ...) { +void Exceptions::fthrow(Thread* thread, const char* file, int line, Symbol* h_name, const char* format, ...) { const int max_msg_size = 1024; va_list ap; va_start(ap, format); @@ -249,8 +240,8 @@ // Creates an exception oop, calls the <init> method with the given signature. // and returns a Handle // Initializes the cause if cause non-null -Handle Exceptions::new_exception(Thread *thread, symbolHandle h_name, - symbolHandle signature, +Handle Exceptions::new_exception(Thread *thread, Symbol* h_name, + Symbol* signature, JavaCallArguments *args, Handle h_cause, Handle h_loader, Handle h_protection_domain) { @@ -277,7 +268,7 @@ args->set_receiver(h_exception); // Call constructor JavaCalls::call_special(&result, klass, - vmSymbolHandles::object_initializer_name(), + vmSymbols::object_initializer_name(), signature, args, thread); @@ -294,8 +285,8 @@ args1.set_receiver(h_exception); args1.push_oop(h_cause); JavaCalls::call_virtual(&result1, klass, - vmSymbolHandles::initCause_name(), - vmSymbolHandles::throwable_throwable_signature(), + vmSymbols::initCause_name(), + vmSymbols::throwable_throwable_signature(), &args1, thread); } @@ -311,15 +302,15 @@ // Convenience method. Calls either the <init>() or <init>(String) method when // creating a new exception -Handle Exceptions::new_exception(Thread* thread, symbolHandle h_name, +Handle Exceptions::new_exception(Thread* thread, Symbol* h_name, const char* message, Handle h_cause, Handle h_loader, Handle h_protection_domain, ExceptionMsgToUtf8Mode to_utf8_safe) { JavaCallArguments args; - symbolHandle signature; + Symbol* signature = NULL; if (message == NULL) { - signature = vmSymbolHandles::void_method_signature(); + signature = vmSymbols::void_method_signature(); } else { // We want to allocate storage, but we can't do that if there's // a pending exception, so we preserve any pending exception @@ -350,7 +341,7 @@ return incoming_exception; } args.push_oop(msg); - signature = vmSymbolHandles::string_void_signature(); + signature = vmSymbols::string_void_signature(); } return new_exception(thread, h_name, signature, &args, h_cause, h_loader, h_protection_domain); } @@ -364,15 +355,14 @@ // point is to push this flag down to class java_lang_String since other // classes may need similar functionalities. Handle Exceptions::new_exception(Thread* thread, - symbolOop name, + Symbol* name, const char* message, ExceptionMsgToUtf8Mode to_utf8_safe) { - symbolHandle h_name(thread, name); Handle h_loader(thread, NULL); Handle h_prot(thread, NULL); Handle h_cause(thread, NULL); - return Exceptions::new_exception(thread, h_name, message, h_cause, h_loader, + return Exceptions::new_exception(thread, name, message, h_cause, h_loader, h_prot, to_utf8_safe); }