1 /* |
1 /* |
2 * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. |
3 * Copyright (c) 2012 Red Hat, Inc. |
3 * Copyright (c) 2012 Red Hat, Inc. |
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5 * |
5 * |
6 * This code is free software; you can redistribute it and/or modify it |
6 * This code is free software; you can redistribute it and/or modify it |
7 * under the terms of the GNU General Public License version 2 only, as |
7 * under the terms of the GNU General Public License version 2 only, as |
707 jint ret = JNI_OK; |
707 jint ret = JNI_OK; |
708 DT_RETURN_MARK(Throw, jint, (const jint&)ret); |
708 DT_RETURN_MARK(Throw, jint, (const jint&)ret); |
709 |
709 |
710 THROW_OOP_(JNIHandles::resolve(obj), JNI_OK); |
710 THROW_OOP_(JNIHandles::resolve(obj), JNI_OK); |
711 ShouldNotReachHere(); |
711 ShouldNotReachHere(); |
|
712 return 0; // Mute compiler. |
712 JNI_END |
713 JNI_END |
713 |
714 |
714 #ifndef USDT2 |
715 #ifndef USDT2 |
715 DT_RETURN_MARK_DECL(ThrowNew, jint); |
716 DT_RETURN_MARK_DECL(ThrowNew, jint); |
716 #else /* USDT2 */ |
717 #else /* USDT2 */ |
733 Symbol* name = k->name(); |
734 Symbol* name = k->name(); |
734 Handle class_loader (THREAD, k->class_loader()); |
735 Handle class_loader (THREAD, k->class_loader()); |
735 Handle protection_domain (THREAD, k->protection_domain()); |
736 Handle protection_domain (THREAD, k->protection_domain()); |
736 THROW_MSG_LOADER_(name, (char *)message, class_loader, protection_domain, JNI_OK); |
737 THROW_MSG_LOADER_(name, (char *)message, class_loader, protection_domain, JNI_OK); |
737 ShouldNotReachHere(); |
738 ShouldNotReachHere(); |
|
739 return 0; // Mute compiler. |
738 JNI_END |
740 JNI_END |
739 |
741 |
740 |
742 |
741 // JNI functions only transform a pending async exception to a synchronous |
743 // JNI functions only transform a pending async exception to a synchronous |
742 // exception in ExceptionOccurred and ExceptionCheck calls, since |
744 // exception in ExceptionOccurred and ExceptionCheck calls, since |
1138 // each of these paths is exercized by the various jck Call[Static,Nonvirtual,][Void,Int,..]Method[A,V,] tests |
1140 // each of these paths is exercized by the various jck Call[Static,Nonvirtual,][Void,Int,..]Method[A,V,] tests |
1139 |
1141 |
1140 inline void get_long() { _arguments->push_long(va_arg(_ap, jlong)); } |
1142 inline void get_long() { _arguments->push_long(va_arg(_ap, jlong)); } |
1141 inline void get_float() { _arguments->push_float((jfloat)va_arg(_ap, jdouble)); } // float is coerced to double w/ va_arg |
1143 inline void get_float() { _arguments->push_float((jfloat)va_arg(_ap, jdouble)); } // float is coerced to double w/ va_arg |
1142 inline void get_double() { _arguments->push_double(va_arg(_ap, jdouble)); } |
1144 inline void get_double() { _arguments->push_double(va_arg(_ap, jdouble)); } |
1143 inline void get_object() { jobject l = va_arg(_ap, jobject); |
1145 inline void get_object() { _arguments->push_jobject(va_arg(_ap, jobject)); } |
1144 _arguments->push_oop(Handle((oop *)l, false)); } |
|
1145 |
1146 |
1146 inline void set_ap(va_list rap) { |
1147 inline void set_ap(va_list rap) { |
1147 #ifdef va_copy |
1148 #ifdef va_copy |
1148 va_copy(_ap, rap); |
1149 va_copy(_ap, rap); |
1149 #elif defined (__va_copy) |
1150 #elif defined (__va_copy) |
1233 inline void get_int() { _arguments->push_int((jint)(_ap++)->i); } |
1234 inline void get_int() { _arguments->push_int((jint)(_ap++)->i); } |
1234 |
1235 |
1235 inline void get_long() { _arguments->push_long((_ap++)->j); } |
1236 inline void get_long() { _arguments->push_long((_ap++)->j); } |
1236 inline void get_float() { _arguments->push_float((_ap++)->f); } |
1237 inline void get_float() { _arguments->push_float((_ap++)->f); } |
1237 inline void get_double() { _arguments->push_double((_ap++)->d);} |
1238 inline void get_double() { _arguments->push_double((_ap++)->d);} |
1238 inline void get_object() { _arguments->push_oop(Handle((oop *)(_ap++)->l, false)); } |
1239 inline void get_object() { _arguments->push_jobject((_ap++)->l); } |
1239 |
1240 |
1240 inline void set_ap(const jvalue *rap) { _ap = rap; } |
1241 inline void set_ap(const jvalue *rap) { _ap = rap; } |
1241 |
1242 |
1242 public: |
1243 public: |
1243 JNI_ArgumentPusherArray(Symbol* signature, const jvalue *rap) |
1244 JNI_ArgumentPusherArray(Symbol* signature, const jvalue *rap) |