comparison src/share/vm/jvmci/jvmciRuntime.cpp @ 22733:732763293625

must use JVMCI class loader when trying to throw a JVMCIError from native VM code
author Doug Simon <doug.simon@oracle.com>
date Thu, 12 Nov 2015 20:03:43 +0100
parents 0229a2ca608b
children ab84ba890aa4
comparison
equal deleted inserted replaced
22732:b2ffe9891356 22733:732763293625
1042 // This can be very useful when debugging class initialization 1042 // This can be very useful when debugging class initialization
1043 // failures. 1043 // failures.
1044 os::sleep(THREAD, 200, false); 1044 os::sleep(THREAD, 200, false);
1045 1045
1046 vm_abort(dump_core); 1046 vm_abort(dump_core);
1047 }
1048
1049 void JVMCIRuntime::fthrow_error(Thread* thread, const char* file, int line, const char* format, ...) {
1050 const int max_msg_size = 1024;
1051 va_list ap;
1052 va_start(ap, format);
1053 char msg[max_msg_size];
1054 vsnprintf(msg, max_msg_size, format, ap);
1055 msg[max_msg_size-1] = '\0';
1056 va_end(ap);
1057 Handle h_loader = Handle(thread, SystemDictionary::jvmci_loader());
1058 Handle h_protection_domain = Handle();
1059 Exceptions::_throw_msg(thread, file, line, vmSymbols::jdk_vm_ci_common_JVMCIError(), msg, h_loader, h_protection_domain);
1047 } 1060 }
1048 1061
1049 Klass* JVMCIRuntime::resolve_or_null(Symbol* name, TRAPS) { 1062 Klass* JVMCIRuntime::resolve_or_null(Symbol* name, TRAPS) {
1050 return SystemDictionary::resolve_or_null(name, SystemDictionary::jvmci_loader(), Handle(), CHECK_NULL); 1063 return SystemDictionary::resolve_or_null(name, SystemDictionary::jvmci_loader(), Handle(), CHECK_NULL);
1051 } 1064 }