src/share/vm/prims/jvm_misc.hpp

changeset 435
a61af66fc99e
child 1092
715dceaa89b7
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/share/vm/prims/jvm_misc.hpp	Sat Dec 01 00:00:00 2007 +0000
     1.3 @@ -0,0 +1,88 @@
     1.4 +/*
     1.5 + * Copyright 1998-2005 Sun Microsystems, Inc.  All Rights Reserved.
     1.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.7 + *
     1.8 + * This code is free software; you can redistribute it and/or modify it
     1.9 + * under the terms of the GNU General Public License version 2 only, as
    1.10 + * published by the Free Software Foundation.
    1.11 + *
    1.12 + * This code is distributed in the hope that it will be useful, but WITHOUT
    1.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    1.14 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    1.15 + * version 2 for more details (a copy is included in the LICENSE file that
    1.16 + * accompanied this code).
    1.17 + *
    1.18 + * You should have received a copy of the GNU General Public License version
    1.19 + * 2 along with this work; if not, write to the Free Software Foundation,
    1.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1.21 + *
    1.22 + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
    1.23 + * CA 95054 USA or visit www.sun.com if you need additional information or
    1.24 + * have any questions.
    1.25 + *
    1.26 + */
    1.27 +
    1.28 +// Useful entry points shared by JNI and JVM interface.
    1.29 +// We do not allow real JNI or JVM entry point to call each other.
    1.30 +
    1.31 +jclass find_class_from_class_loader(JNIEnv* env, symbolHandle name, jboolean init, Handle loader, Handle protection_domain, jboolean throwError, TRAPS);
    1.32 +
    1.33 +
    1.34 +/*
    1.35 + * Support for Serialization and RMI. Currently used by HotSpot only.
    1.36 + */
    1.37 +
    1.38 +extern "C" {
    1.39 +
    1.40 +void JNICALL
    1.41 +JVM_SetPrimitiveFieldValues(JNIEnv *env, jclass cb, jobject obj,
    1.42 +                            jlongArray fieldIDs, jcharArray typecodes, jbyteArray data);
    1.43 +
    1.44 +void JNICALL
    1.45 +JVM_GetPrimitiveFieldValues(JNIEnv *env, jclass cb, jobject obj,
    1.46 +                            jlongArray fieldIDs, jcharArray typecodes, jbyteArray data);
    1.47 +
    1.48 +}
    1.49 +
    1.50 +/*
    1.51 + * Support for -Xcheck:jni
    1.52 + */
    1.53 +
    1.54 +extern struct JNINativeInterface_* jni_functions_nocheck();
    1.55 +extern struct JNINativeInterface_* jni_functions_check();
    1.56 +
    1.57 +/*
    1.58 + * Support for swappable jni function table.
    1.59 + */
    1.60 +extern struct JNINativeInterface_* jni_functions();
    1.61 +extern void copy_jni_function_table(const struct JNINativeInterface_* new_function_table);
    1.62 +
    1.63 +// Support for fast JNI accessors
    1.64 +extern "C" {
    1.65 +  typedef jboolean (JNICALL *GetBooleanField_t)
    1.66 +      (JNIEnv *env, jobject obj, jfieldID fieldID);
    1.67 +  typedef jbyte (JNICALL *GetByteField_t)
    1.68 +      (JNIEnv *env, jobject obj, jfieldID fieldID);
    1.69 +  typedef jchar (JNICALL *GetCharField_t)
    1.70 +      (JNIEnv *env, jobject obj, jfieldID fieldID);
    1.71 +  typedef jshort (JNICALL *GetShortField_t)
    1.72 +      (JNIEnv *env, jobject obj, jfieldID fieldID);
    1.73 +  typedef jint (JNICALL *GetIntField_t)
    1.74 +      (JNIEnv *env, jobject obj, jfieldID fieldID);
    1.75 +  typedef jlong (JNICALL *GetLongField_t)
    1.76 +      (JNIEnv *env, jobject obj, jfieldID fieldID);
    1.77 +  typedef jfloat (JNICALL *GetFloatField_t)
    1.78 +      (JNIEnv *env, jobject obj, jfieldID fieldID);
    1.79 +  typedef jdouble (JNICALL *GetDoubleField_t)
    1.80 +    (JNIEnv *env, jobject obj, jfieldID fieldID);
    1.81 +}
    1.82 +
    1.83 +void    quicken_jni_functions();
    1.84 +address jni_GetBooleanField_addr();
    1.85 +address jni_GetByteField_addr();
    1.86 +address jni_GetCharField_addr();
    1.87 +address jni_GetShortField_addr();
    1.88 +address jni_GetIntField_addr();
    1.89 +address jni_GetLongField_addr();
    1.90 +address jni_GetFloatField_addr();
    1.91 +address jni_GetDoubleField_addr();

mercurial