Mercurial > hg > graal-jvmci-8
diff src/share/vm/runtime/signature.cpp @ 1508:2ffde6cfe049
6939196: method handle signatures off the boot class path get linkage errors
Summary: Adjust MethodType lookup logic to search off the BCP, but not to cache those results
Reviewed-by: twisti
author | jrose |
---|---|
date | Sat, 01 May 2010 21:57:35 -0700 |
parents | a61af66fc99e |
children | df736661d0c8 |
line wrap: on
line diff
--- a/src/share/vm/runtime/signature.cpp Sat May 01 02:42:18 2010 -0700 +++ b/src/share/vm/runtime/signature.cpp Sat May 01 21:57:35 2010 -0700 @@ -327,6 +327,26 @@ return result; } +klassOop SignatureStream::as_klass(Handle class_loader, Handle protection_domain, + FailureMode failure_mode, TRAPS) { + if (!is_object()) return NULL; + symbolOop name = as_symbol(CHECK_NULL); + if (failure_mode == ReturnNull) { + return SystemDictionary::resolve_or_null(name, class_loader, protection_domain, THREAD); + } else { + bool throw_error = (failure_mode == NCDFError); + return SystemDictionary::resolve_or_fail(name, class_loader, protection_domain, throw_error, THREAD); + } +} + +oop SignatureStream::as_java_mirror(Handle class_loader, Handle protection_domain, + FailureMode failure_mode, TRAPS) { + if (!is_object()) + return Universe::java_mirror(type()); + klassOop klass = as_klass(class_loader, protection_domain, failure_mode, CHECK_NULL); + if (klass == NULL) return NULL; + return Klass::cast(klass)->java_mirror(); +} symbolOop SignatureStream::as_symbol_or_null() { // Create a symbol from for string _begin _end