Path: blob/aarch64-shenandoah-jdk8u272-b10/hotspot/src/share/vm/prims/jvm_misc.hpp
32285 views
/*1* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation.7*8* This code is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11* version 2 for more details (a copy is included in the LICENSE file that12* accompanied this code).13*14* You should have received a copy of the GNU General Public License version15* 2 along with this work; if not, write to the Free Software Foundation,16* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17*18* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19* or visit www.oracle.com if you need additional information or have any20* questions.21*22*/2324#ifndef SHARE_VM_PRIMS_JVM_MISC_HPP25#define SHARE_VM_PRIMS_JVM_MISC_HPP2627#include "prims/jni.h"28#include "runtime/handles.hpp"2930// Useful entry points shared by JNI and JVM interface.31// We do not allow real JNI or JVM entry point to call each other.3233jclass find_class_from_class_loader(JNIEnv* env, Symbol* name, jboolean init, Handle loader, Handle protection_domain, jboolean throwError, TRAPS);3435void trace_class_resolution(Klass* to_class);3637/*38* Support for -Xcheck:jni39*/4041extern struct JNINativeInterface_* jni_functions_nocheck();42extern struct JNINativeInterface_* jni_functions_check();4344/*45* Support for swappable jni function table.46*/47extern struct JNINativeInterface_* jni_functions();48extern void copy_jni_function_table(const struct JNINativeInterface_* new_function_table);4950// Support for fast JNI accessors51extern "C" {52typedef jboolean (JNICALL *GetBooleanField_t)53(JNIEnv *env, jobject obj, jfieldID fieldID);54typedef jbyte (JNICALL *GetByteField_t)55(JNIEnv *env, jobject obj, jfieldID fieldID);56typedef jchar (JNICALL *GetCharField_t)57(JNIEnv *env, jobject obj, jfieldID fieldID);58typedef jshort (JNICALL *GetShortField_t)59(JNIEnv *env, jobject obj, jfieldID fieldID);60typedef jint (JNICALL *GetIntField_t)61(JNIEnv *env, jobject obj, jfieldID fieldID);62typedef jlong (JNICALL *GetLongField_t)63(JNIEnv *env, jobject obj, jfieldID fieldID);64typedef jfloat (JNICALL *GetFloatField_t)65(JNIEnv *env, jobject obj, jfieldID fieldID);66typedef jdouble (JNICALL *GetDoubleField_t)67(JNIEnv *env, jobject obj, jfieldID fieldID);68}6970void quicken_jni_functions();71address jni_GetBooleanField_addr();72address jni_GetByteField_addr();73address jni_GetCharField_addr();74address jni_GetShortField_addr();75address jni_GetIntField_addr();76address jni_GetLongField_addr();77address jni_GetFloatField_addr();78address jni_GetDoubleField_addr();7980#endif // SHARE_VM_PRIMS_JVM_MISC_HPP818283