1472N/A * or visit www.oracle.com if you need additional information or have any
1879N/A#include "precompiled.hpp"
1879N/A#include "classfile/systemDictionary.hpp"
1879N/A#include "classfile/vmSymbols.hpp"
1879N/A#include "oops/instanceKlass.hpp"
1879N/A#include "oops/oop.inline.hpp"
2062N/A#include "oops/symbol.hpp"
1879N/A#include "prims/jniCheck.hpp"
1879N/A#include "prims/jvm_misc.hpp"
1879N/A#include "runtime/fieldDescriptor.hpp"
1879N/A#include "runtime/handles.hpp"
1879N/A#include "runtime/interfaceSupport.hpp"
1879N/A#include "runtime/jfieldIDWorkaround.hpp"
1879N/A#include "runtime/thread.hpp"
1879N/A#ifdef TARGET_ARCH_x86
1879N/A# include "jniTypes_x86.hpp"
1879N/A#ifdef TARGET_ARCH_sparc
1879N/A# include "jniTypes_sparc.hpp"
1879N/A#ifdef TARGET_ARCH_zero
1879N/A# include "jniTypes_zero.hpp"
2073N/A#ifdef TARGET_ARCH_arm
2073N/A# include "jniTypes_arm.hpp"
2073N/A#ifdef TARGET_ARCH_ppc
2073N/A# include "jniTypes_ppc.hpp"
0N/Astatic const char * warn_bad_class_descriptor = "JNI FindClass received a bad class descriptor \"%s\". A correct class descriptor " \
0N/A "has no leading \"L\" or trailing \";\". Incorrect descriptors will not be accepted in future releases.";
0N/Astatic const char * fatal_using_jnienv_in_nonjava = "FATAL ERROR in native method: Using JNIEnv in non-Java thread";
0N/Astatic const char * warn_other_function_in_critical = "Warning: Calling other JNI functions in the scope of " \
0N/Astatic const char * fatal_class_not_a_class = "JNI received a class argument that is not a class";
0N/Astatic const char * fatal_class_not_a_throwable_class = "JNI Throw or ThrowNew received a class argument that is not a Throwable or Throwable subclass";
0N/Astatic const char * fatal_wrong_class_or_method = "Wrong object class or methodID passed to JNI call";
0N/Astatic const char * fatal_unknown_array_object = "Unknown array object passed to JNI array operations";
0N/Astatic const char * fatal_object_array_expected = "Object array expected but not received for JNI array operation";
0N/Astatic const char * fatal_static_field_not_found = "Static field not found in JNI get/set field operations";
0N/Astatic const char * fatal_static_field_mismatch = "Field type (static) mismatch in JNI get/set field operations";
0N/Astatic const char * fatal_instance_field_not_found = "Instance field not found in JNI get/set field operations";
0N/Astatic const char * fatal_instance_field_mismatch = "Field type (instance) mismatch in JNI get/set field operations";
0N/AJNI_ENTRY_CHECKED(void,
0N/AJNI_ENTRY_CHECKED(void,
0N/AJNI_ENTRY_CHECKED(void,
0N/AJNI_ENTRY_CHECKED(void,
0N/AJNI_ENTRY_CHECKED(void,
0N/AJNI_ENTRY_CHECKED(void,
0N/AJNI_ENTRY_CHECKED(void,
0N/AJNI_ENTRY_CHECKED(void,
0N/AJNI_ENTRY_CHECKED(void,
0N/AJNI_ENTRY_CHECKED(void,
0N/AJNI_ENTRY_CHECKED(void,
0N/AJNI_ENTRY_CHECKED(void, \
0N/AJNI_ENTRY_CHECKED(void,
0N/AJNI_ENTRY_CHECKED(void,
0N/AJNI_ENTRY_CHECKED(void,
0N/AJNI_ENTRY_CHECKED(void, \
1896N/A assert (isCopy == NULL || *isCopy == JNI_TRUE, "GetStringChars didn't return a copy as expected");
1896N/A // Avoiding call to UNCHECKED()->ReleaseStringChars() since that will fire unexpected dtrace probes
1896N/A // Note that the dtrace arguments for the allocated memory will not match up with this solution.
0N/AJNI_ENTRY_CHECKED(void,
1896N/A NativeReportJNIFatalError(thr, "ReleaseStringChars called on something not allocated by GetStringChars");
0N/AJNI_ENTRY_CHECKED(const char *,
1896N/A assert (isCopy == NULL || *isCopy == JNI_TRUE, "GetStringUTFChars didn't return a copy as expected");
1896N/A // Avoiding call to UNCHECKED()->ReleaseStringUTFChars() since that will fire unexpected dtrace probes
1896N/A // Note that the dtrace arguments for the allocated memory will not match up with this solution.
0N/AJNI_ENTRY_CHECKED(void,
1896N/A NativeReportJNIFatalError(thr, "ReleaseStringUTFChars called on something not allocated by GetStringUTFChars");
0N/AJNI_ENTRY_CHECKED(void,
0N/AJNI_ENTRY_CHECKED(void, \
0N/AJNI_ENTRY_CHECKED(void, \
0N/AJNI_ENTRY_CHECKED(void, \
0N/AJNI_ENTRY_CHECKED(void,
0N/AJNI_ENTRY_CHECKED(void,
0N/AJNI_ENTRY_CHECKED(void *,
0N/AJNI_ENTRY_CHECKED(void,
0N/AJNI_ENTRY_CHECKED(void,
0N/AJNI_ENTRY_CHECKED(void,
0N/AJNI_ENTRY_CHECKED(void *,
0N/A sizeof(*unchecked_jni_NativeInterface) - sizeof(char *));)
0N/A if (PrintJNIResolving) {
0N/A return &checked_jni_NativeInterface;