comparison src/share/vm/prims/jvm.cpp @ 14422:2b8e28fdf503

Merge
author kvn
date Tue, 05 Nov 2013 17:38:04 -0800
parents bdd155477289 615d83933195
children abec000618bf bbfbe9b06038
comparison
equal deleted inserted replaced
14421:3068270ba476 14422:2b8e28fdf503
669 669
670 670
671 JVM_ENTRY(jclass, JVM_GetCallerClass(JNIEnv* env, int depth)) 671 JVM_ENTRY(jclass, JVM_GetCallerClass(JNIEnv* env, int depth))
672 JVMWrapper("JVM_GetCallerClass"); 672 JVMWrapper("JVM_GetCallerClass");
673 673
674 // Pre-JDK 8 and early builds of JDK 8 don't have a CallerSensitive annotation. 674 // Pre-JDK 8 and early builds of JDK 8 don't have a CallerSensitive annotation; or
675 if (SystemDictionary::reflect_CallerSensitive_klass() == NULL) { 675 // sun.reflect.Reflection.getCallerClass with a depth parameter is provided
676 // temporarily for existing code to use until a replacement API is defined.
677 if (SystemDictionary::reflect_CallerSensitive_klass() == NULL || depth != JVM_CALLER_DEPTH) {
676 Klass* k = thread->security_get_caller_class(depth); 678 Klass* k = thread->security_get_caller_class(depth);
677 return (k == NULL) ? NULL : (jclass) JNIHandles::make_local(env, k->java_mirror()); 679 return (k == NULL) ? NULL : (jclass) JNIHandles::make_local(env, k->java_mirror());
678 } else {
679 // Basic handshaking with Java_sun_reflect_Reflection_getCallerClass
680 assert(depth == -1, "wrong handshake depth");
681 } 680 }
682 681
683 // Getting the class of the caller frame. 682 // Getting the class of the caller frame.
684 // 683 //
685 // The call stack at this point looks something like this: 684 // The call stack at this point looks something like this:
1825 int offset = fs.offset(); 1824 int offset = fs.offset();
1826 if (offset == java_lang_Throwable::get_backtrace_offset()) continue; 1825 if (offset == java_lang_Throwable::get_backtrace_offset()) continue;
1827 } 1826 }
1828 1827
1829 if (!publicOnly || fs.access_flags().is_public()) { 1828 if (!publicOnly || fs.access_flags().is_public()) {
1830 fd.initialize(k(), fs.index()); 1829 fd.reinitialize(k(), fs.index());
1831 oop field = Reflection::new_field(&fd, UseNewReflection, CHECK_NULL); 1830 oop field = Reflection::new_field(&fd, UseNewReflection, CHECK_NULL);
1832 result->obj_at_put(out_idx, field); 1831 result->obj_at_put(out_idx, field);
1833 ++out_idx; 1832 ++out_idx;
1834 } 1833 }
1835 } 1834 }
1836 assert(out_idx == num_fields, "just checking"); 1835 assert(out_idx == num_fields, "just checking");
1837 return (jobjectArray) JNIHandles::make_local(env, result()); 1836 return (jobjectArray) JNIHandles::make_local(env, result());
1838 } 1837 }
1839 JVM_END 1838 JVM_END
1840 1839
1841 JVM_ENTRY(jobjectArray, JVM_GetClassDeclaredMethods(JNIEnv *env, jclass ofClass, jboolean publicOnly)) 1840 static bool select_method(methodHandle method, bool want_constructor) {
1842 { 1841 if (want_constructor) {
1843 JVMWrapper("JVM_GetClassDeclaredMethods"); 1842 return (method->is_initializer() && !method->is_static());
1843 } else {
1844 return (!method->is_initializer() && !method->is_overpass());
1845 }
1846 }
1847
1848 static jobjectArray get_class_declared_methods_helper(
1849 JNIEnv *env,
1850 jclass ofClass, jboolean publicOnly,
1851 bool want_constructor,
1852 Klass* klass, TRAPS) {
1853
1844 JvmtiVMObjectAllocEventCollector oam; 1854 JvmtiVMObjectAllocEventCollector oam;
1845 1855
1846 // Exclude primitive types and array types 1856 // Exclude primitive types and array types
1847 if (java_lang_Class::is_primitive(JNIHandles::resolve_non_null(ofClass)) 1857 if (java_lang_Class::is_primitive(JNIHandles::resolve_non_null(ofClass))
1848 || java_lang_Class::as_Klass(JNIHandles::resolve_non_null(ofClass))->oop_is_array()) { 1858 || java_lang_Class::as_Klass(JNIHandles::resolve_non_null(ofClass))->oop_is_array()) {
1849 // Return empty array 1859 // Return empty array
1850 oop res = oopFactory::new_objArray(SystemDictionary::reflect_Method_klass(), 0, CHECK_NULL); 1860 oop res = oopFactory::new_objArray(klass, 0, CHECK_NULL);
1851 return (jobjectArray) JNIHandles::make_local(env, res); 1861 return (jobjectArray) JNIHandles::make_local(env, res);
1852 } 1862 }
1853 1863
1854 instanceKlassHandle k(THREAD, java_lang_Class::as_Klass(JNIHandles::resolve_non_null(ofClass))); 1864 instanceKlassHandle k(THREAD, java_lang_Class::as_Klass(JNIHandles::resolve_non_null(ofClass)));
1855 1865
1856 // Ensure class is linked 1866 // Ensure class is linked
1857 k->link_class(CHECK_NULL); 1867 k->link_class(CHECK_NULL);
1858 1868
1859 Array<Method*>* methods = k->methods(); 1869 Array<Method*>* methods = k->methods();
1860 int methods_length = methods->length(); 1870 int methods_length = methods->length();
1871
1872 // Save original method_idnum in case of redefinition, which can change
1873 // the idnum of obsolete methods. The new method will have the same idnum
1874 // but if we refresh the methods array, the counts will be wrong.
1875 ResourceMark rm(THREAD);
1876 GrowableArray<int>* idnums = new GrowableArray<int>(methods_length);
1861 int num_methods = 0; 1877 int num_methods = 0;
1862 1878
1863 int i; 1879 for (int i = 0; i < methods_length; i++) {
1864 for (i = 0; i < methods_length; i++) {
1865 methodHandle method(THREAD, methods->at(i)); 1880 methodHandle method(THREAD, methods->at(i));
1866 if (!method->is_initializer() && !method->is_overpass()) { 1881 if (select_method(method, want_constructor)) {
1867 if (!publicOnly || method->is_public()) { 1882 if (!publicOnly || method->is_public()) {
1883 idnums->push(method->method_idnum());
1868 ++num_methods; 1884 ++num_methods;
1869 } 1885 }
1870 } 1886 }
1871 } 1887 }
1872 1888
1873 // Allocate result 1889 // Allocate result
1874 objArrayOop r = oopFactory::new_objArray(SystemDictionary::reflect_Method_klass(), num_methods, CHECK_NULL); 1890 objArrayOop r = oopFactory::new_objArray(klass, num_methods, CHECK_NULL);
1875 objArrayHandle result (THREAD, r); 1891 objArrayHandle result (THREAD, r);
1876 1892
1877 int out_idx = 0; 1893 // Now just put the methods that we selected above, but go by their idnum
1878 for (i = 0; i < methods_length; i++) { 1894 // in case of redefinition. The methods can be redefined at any safepoint,
1879 methodHandle method(THREAD, methods->at(i)); 1895 // so above when allocating the oop array and below when creating reflect
1880 if (!method->is_initializer() && !method->is_overpass()) { 1896 // objects.
1881 if (!publicOnly || method->is_public()) { 1897 for (int i = 0; i < num_methods; i++) {
1882 oop m = Reflection::new_method(method, UseNewReflection, false, CHECK_NULL); 1898 methodHandle method(THREAD, k->method_with_idnum(idnums->at(i)));
1883 result->obj_at_put(out_idx, m); 1899 if (method.is_null()) {
1884 ++out_idx; 1900 // Method may have been deleted and seems this API can handle null
1901 // Otherwise should probably put a method that throws NSME
1902 result->obj_at_put(i, NULL);
1903 } else {
1904 oop m;
1905 if (want_constructor) {
1906 m = Reflection::new_constructor(method, CHECK_NULL);
1907 } else {
1908 m = Reflection::new_method(method, UseNewReflection, false, CHECK_NULL);
1885 } 1909 }
1886 } 1910 result->obj_at_put(i, m);
1887 } 1911 }
1888 assert(out_idx == num_methods, "just checking"); 1912 }
1913
1889 return (jobjectArray) JNIHandles::make_local(env, result()); 1914 return (jobjectArray) JNIHandles::make_local(env, result());
1915 }
1916
1917 JVM_ENTRY(jobjectArray, JVM_GetClassDeclaredMethods(JNIEnv *env, jclass ofClass, jboolean publicOnly))
1918 {
1919 JVMWrapper("JVM_GetClassDeclaredMethods");
1920 return get_class_declared_methods_helper(env, ofClass, publicOnly,
1921 /*want_constructor*/ false,
1922 SystemDictionary::reflect_Method_klass(), THREAD);
1890 } 1923 }
1891 JVM_END 1924 JVM_END
1892 1925
1893 JVM_ENTRY(jobjectArray, JVM_GetClassDeclaredConstructors(JNIEnv *env, jclass ofClass, jboolean publicOnly)) 1926 JVM_ENTRY(jobjectArray, JVM_GetClassDeclaredConstructors(JNIEnv *env, jclass ofClass, jboolean publicOnly))
1894 { 1927 {
1895 JVMWrapper("JVM_GetClassDeclaredConstructors"); 1928 JVMWrapper("JVM_GetClassDeclaredConstructors");
1896 JvmtiVMObjectAllocEventCollector oam; 1929 return get_class_declared_methods_helper(env, ofClass, publicOnly,
1897 1930 /*want_constructor*/ true,
1898 // Exclude primitive types and array types 1931 SystemDictionary::reflect_Constructor_klass(), THREAD);
1899 if (java_lang_Class::is_primitive(JNIHandles::resolve_non_null(ofClass))
1900 || java_lang_Class::as_Klass(JNIHandles::resolve_non_null(ofClass))->oop_is_array()) {
1901 // Return empty array
1902 oop res = oopFactory::new_objArray(SystemDictionary::reflect_Constructor_klass(), 0 , CHECK_NULL);
1903 return (jobjectArray) JNIHandles::make_local(env, res);
1904 }
1905
1906 instanceKlassHandle k(THREAD, java_lang_Class::as_Klass(JNIHandles::resolve_non_null(ofClass)));
1907
1908 // Ensure class is linked
1909 k->link_class(CHECK_NULL);
1910
1911 Array<Method*>* methods = k->methods();
1912 int methods_length = methods->length();
1913 int num_constructors = 0;
1914
1915 int i;
1916 for (i = 0; i < methods_length; i++) {
1917 methodHandle method(THREAD, methods->at(i));
1918 if (method->is_initializer() && !method->is_static()) {
1919 if (!publicOnly || method->is_public()) {
1920 ++num_constructors;
1921 }
1922 }
1923 }
1924
1925 // Allocate result
1926 objArrayOop r = oopFactory::new_objArray(SystemDictionary::reflect_Constructor_klass(), num_constructors, CHECK_NULL);
1927 objArrayHandle result(THREAD, r);
1928
1929 int out_idx = 0;
1930 for (i = 0; i < methods_length; i++) {
1931 methodHandle method(THREAD, methods->at(i));
1932 if (method->is_initializer() && !method->is_static()) {
1933 if (!publicOnly || method->is_public()) {
1934 oop m = Reflection::new_constructor(method, CHECK_NULL);
1935 result->obj_at_put(out_idx, m);
1936 ++out_idx;
1937 }
1938 }
1939 }
1940 assert(out_idx == num_constructors, "just checking");
1941 return (jobjectArray) JNIHandles::make_local(env, result());
1942 } 1932 }
1943 JVM_END 1933 JVM_END
1944 1934
1945 JVM_ENTRY(jint, JVM_GetClassAccessFlags(JNIEnv *env, jclass cls)) 1935 JVM_ENTRY(jint, JVM_GetClassAccessFlags(JNIEnv *env, jclass cls))
1946 { 1936 {
3964 "initialization failed" 3954 "initialization failed"
3965 ); 3955 );
3966 } 3956 }
3967 3957
3968 3958
3969 // Serialization
3970 JVM_ENTRY(void, JVM_SetPrimitiveFieldValues(JNIEnv *env, jclass cb, jobject obj,
3971 jlongArray fieldIDs, jcharArray typecodes, jbyteArray data))
3972 assert(!JDK_Version::is_gte_jdk14x_version(), "should only be used in 1.3.1 and earlier");
3973
3974 typeArrayOop tcodes = typeArrayOop(JNIHandles::resolve(typecodes));
3975 typeArrayOop dbuf = typeArrayOop(JNIHandles::resolve(data));
3976 typeArrayOop fids = typeArrayOop(JNIHandles::resolve(fieldIDs));
3977 oop o = JNIHandles::resolve(obj);
3978
3979 if (o == NULL || fids == NULL || dbuf == NULL || tcodes == NULL) {
3980 THROW(vmSymbols::java_lang_NullPointerException());
3981 }
3982
3983 jsize nfids = fids->length();
3984 if (nfids == 0) return;
3985
3986 if (tcodes->length() < nfids) {
3987 THROW(vmSymbols::java_lang_ArrayIndexOutOfBoundsException());
3988 }
3989
3990 jsize off = 0;
3991 /* loop through fields, setting values */
3992 for (jsize i = 0; i < nfids; i++) {
3993 jfieldID fid = (jfieldID)(intptr_t) fids->long_at(i);
3994 int field_offset;
3995 if (fid != NULL) {
3996 // NULL is a legal value for fid, but retrieving the field offset
3997 // trigger assertion in that case
3998 field_offset = jfieldIDWorkaround::from_instance_jfieldID(o->klass(), fid);
3999 }
4000
4001 switch (tcodes->char_at(i)) {
4002 case 'Z':
4003 if (fid != NULL) {
4004 jboolean val = (dbuf->byte_at(off) != 0) ? JNI_TRUE : JNI_FALSE;
4005 o->bool_field_put(field_offset, val);
4006 }
4007 off++;
4008 break;
4009
4010 case 'B':
4011 if (fid != NULL) {
4012 o->byte_field_put(field_offset, dbuf->byte_at(off));
4013 }
4014 off++;
4015 break;
4016
4017 case 'C':
4018 if (fid != NULL) {
4019 jchar val = ((dbuf->byte_at(off + 0) & 0xFF) << 8)
4020 + ((dbuf->byte_at(off + 1) & 0xFF) << 0);
4021 o->char_field_put(field_offset, val);
4022 }
4023 off += 2;
4024 break;
4025
4026 case 'S':
4027 if (fid != NULL) {
4028 jshort val = ((dbuf->byte_at(off + 0) & 0xFF) << 8)
4029 + ((dbuf->byte_at(off + 1) & 0xFF) << 0);
4030 o->short_field_put(field_offset, val);
4031 }
4032 off += 2;
4033 break;
4034
4035 case 'I':
4036 if (fid != NULL) {
4037 jint ival = ((dbuf->byte_at(off + 0) & 0xFF) << 24)
4038 + ((dbuf->byte_at(off + 1) & 0xFF) << 16)
4039 + ((dbuf->byte_at(off + 2) & 0xFF) << 8)
4040 + ((dbuf->byte_at(off + 3) & 0xFF) << 0);
4041 o->int_field_put(field_offset, ival);
4042 }
4043 off += 4;
4044 break;
4045
4046 case 'F':
4047 if (fid != NULL) {
4048 jint ival = ((dbuf->byte_at(off + 0) & 0xFF) << 24)
4049 + ((dbuf->byte_at(off + 1) & 0xFF) << 16)
4050 + ((dbuf->byte_at(off + 2) & 0xFF) << 8)
4051 + ((dbuf->byte_at(off + 3) & 0xFF) << 0);
4052 jfloat fval = (*int_bits_to_float_fn)(env, NULL, ival);
4053 o->float_field_put(field_offset, fval);
4054 }
4055 off += 4;
4056 break;
4057
4058 case 'J':
4059 if (fid != NULL) {
4060 jlong lval = (((jlong) dbuf->byte_at(off + 0) & 0xFF) << 56)
4061 + (((jlong) dbuf->byte_at(off + 1) & 0xFF) << 48)
4062 + (((jlong) dbuf->byte_at(off + 2) & 0xFF) << 40)
4063 + (((jlong) dbuf->byte_at(off + 3) & 0xFF) << 32)
4064 + (((jlong) dbuf->byte_at(off + 4) & 0xFF) << 24)
4065 + (((jlong) dbuf->byte_at(off + 5) & 0xFF) << 16)
4066 + (((jlong) dbuf->byte_at(off + 6) & 0xFF) << 8)
4067 + (((jlong) dbuf->byte_at(off + 7) & 0xFF) << 0);
4068 o->long_field_put(field_offset, lval);
4069 }
4070 off += 8;
4071 break;
4072
4073 case 'D':
4074 if (fid != NULL) {
4075 jlong lval = (((jlong) dbuf->byte_at(off + 0) & 0xFF) << 56)
4076 + (((jlong) dbuf->byte_at(off + 1) & 0xFF) << 48)
4077 + (((jlong) dbuf->byte_at(off + 2) & 0xFF) << 40)
4078 + (((jlong) dbuf->byte_at(off + 3) & 0xFF) << 32)
4079 + (((jlong) dbuf->byte_at(off + 4) & 0xFF) << 24)
4080 + (((jlong) dbuf->byte_at(off + 5) & 0xFF) << 16)
4081 + (((jlong) dbuf->byte_at(off + 6) & 0xFF) << 8)
4082 + (((jlong) dbuf->byte_at(off + 7) & 0xFF) << 0);
4083 jdouble dval = (*long_bits_to_double_fn)(env, NULL, lval);
4084 o->double_field_put(field_offset, dval);
4085 }
4086 off += 8;
4087 break;
4088
4089 default:
4090 // Illegal typecode
4091 THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(), "illegal typecode");
4092 }
4093 }
4094 JVM_END
4095
4096
4097 JVM_ENTRY(void, JVM_GetPrimitiveFieldValues(JNIEnv *env, jclass cb, jobject obj,
4098 jlongArray fieldIDs, jcharArray typecodes, jbyteArray data))
4099 assert(!JDK_Version::is_gte_jdk14x_version(), "should only be used in 1.3.1 and earlier");
4100
4101 typeArrayOop tcodes = typeArrayOop(JNIHandles::resolve(typecodes));
4102 typeArrayOop dbuf = typeArrayOop(JNIHandles::resolve(data));
4103 typeArrayOop fids = typeArrayOop(JNIHandles::resolve(fieldIDs));
4104 oop o = JNIHandles::resolve(obj);
4105
4106 if (o == NULL || fids == NULL || dbuf == NULL || tcodes == NULL) {
4107 THROW(vmSymbols::java_lang_NullPointerException());
4108 }
4109
4110 jsize nfids = fids->length();
4111 if (nfids == 0) return;
4112
4113 if (tcodes->length() < nfids) {
4114 THROW(vmSymbols::java_lang_ArrayIndexOutOfBoundsException());
4115 }
4116
4117 /* loop through fields, fetching values */
4118 jsize off = 0;
4119 for (jsize i = 0; i < nfids; i++) {
4120 jfieldID fid = (jfieldID)(intptr_t) fids->long_at(i);
4121 if (fid == NULL) {
4122 THROW(vmSymbols::java_lang_NullPointerException());
4123 }
4124 int field_offset = jfieldIDWorkaround::from_instance_jfieldID(o->klass(), fid);
4125
4126 switch (tcodes->char_at(i)) {
4127 case 'Z':
4128 {
4129 jboolean val = o->bool_field(field_offset);
4130 dbuf->byte_at_put(off++, (val != 0) ? 1 : 0);
4131 }
4132 break;
4133
4134 case 'B':
4135 dbuf->byte_at_put(off++, o->byte_field(field_offset));
4136 break;
4137
4138 case 'C':
4139 {
4140 jchar val = o->char_field(field_offset);
4141 dbuf->byte_at_put(off++, (val >> 8) & 0xFF);
4142 dbuf->byte_at_put(off++, (val >> 0) & 0xFF);
4143 }
4144 break;
4145
4146 case 'S':
4147 {
4148 jshort val = o->short_field(field_offset);
4149 dbuf->byte_at_put(off++, (val >> 8) & 0xFF);
4150 dbuf->byte_at_put(off++, (val >> 0) & 0xFF);
4151 }
4152 break;
4153
4154 case 'I':
4155 {
4156 jint val = o->int_field(field_offset);
4157 dbuf->byte_at_put(off++, (val >> 24) & 0xFF);
4158 dbuf->byte_at_put(off++, (val >> 16) & 0xFF);
4159 dbuf->byte_at_put(off++, (val >> 8) & 0xFF);
4160 dbuf->byte_at_put(off++, (val >> 0) & 0xFF);
4161 }
4162 break;
4163
4164 case 'F':
4165 {
4166 jfloat fval = o->float_field(field_offset);
4167 jint ival = (*float_to_int_bits_fn)(env, NULL, fval);
4168 dbuf->byte_at_put(off++, (ival >> 24) & 0xFF);
4169 dbuf->byte_at_put(off++, (ival >> 16) & 0xFF);
4170 dbuf->byte_at_put(off++, (ival >> 8) & 0xFF);
4171 dbuf->byte_at_put(off++, (ival >> 0) & 0xFF);
4172 }
4173 break;
4174
4175 case 'J':
4176 {
4177 jlong val = o->long_field(field_offset);
4178 dbuf->byte_at_put(off++, (val >> 56) & 0xFF);
4179 dbuf->byte_at_put(off++, (val >> 48) & 0xFF);
4180 dbuf->byte_at_put(off++, (val >> 40) & 0xFF);
4181 dbuf->byte_at_put(off++, (val >> 32) & 0xFF);
4182 dbuf->byte_at_put(off++, (val >> 24) & 0xFF);
4183 dbuf->byte_at_put(off++, (val >> 16) & 0xFF);
4184 dbuf->byte_at_put(off++, (val >> 8) & 0xFF);
4185 dbuf->byte_at_put(off++, (val >> 0) & 0xFF);
4186 }
4187 break;
4188
4189 case 'D':
4190 {
4191 jdouble dval = o->double_field(field_offset);
4192 jlong lval = (*double_to_long_bits_fn)(env, NULL, dval);
4193 dbuf->byte_at_put(off++, (lval >> 56) & 0xFF);
4194 dbuf->byte_at_put(off++, (lval >> 48) & 0xFF);
4195 dbuf->byte_at_put(off++, (lval >> 40) & 0xFF);
4196 dbuf->byte_at_put(off++, (lval >> 32) & 0xFF);
4197 dbuf->byte_at_put(off++, (lval >> 24) & 0xFF);
4198 dbuf->byte_at_put(off++, (lval >> 16) & 0xFF);
4199 dbuf->byte_at_put(off++, (lval >> 8) & 0xFF);
4200 dbuf->byte_at_put(off++, (lval >> 0) & 0xFF);
4201 }
4202 break;
4203
4204 default:
4205 // Illegal typecode
4206 THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(), "illegal typecode");
4207 }
4208 }
4209 JVM_END
4210
4211 3959
4212 // Shared JNI/JVM entry points ////////////////////////////////////////////////////////////// 3960 // Shared JNI/JVM entry points //////////////////////////////////////////////////////////////
4213 3961
4214 jclass find_class_from_class_loader(JNIEnv* env, Symbol* name, jboolean init, Handle loader, Handle protection_domain, jboolean throwError, TRAPS) { 3962 jclass find_class_from_class_loader(JNIEnv* env, Symbol* name, jboolean init, Handle loader, Handle protection_domain, jboolean throwError, TRAPS) {
4215 // Security Note: 3963 // Security Note:
4236 JNIEXPORT void JNICALL JVM_VMBreakPoint(JNIEnv *env, jobject obj); 3984 JNIEXPORT void JNICALL JVM_VMBreakPoint(JNIEnv *env, jobject obj);
4237 } 3985 }
4238 3986
4239 JVM_LEAF(jboolean, JVM_AccessVMBooleanFlag(const char* name, jboolean* value, jboolean is_get)) 3987 JVM_LEAF(jboolean, JVM_AccessVMBooleanFlag(const char* name, jboolean* value, jboolean is_get))
4240 JVMWrapper("JVM_AccessBoolVMFlag"); 3988 JVMWrapper("JVM_AccessBoolVMFlag");
4241 return is_get ? CommandLineFlags::boolAt((char*) name, (bool*) value) : CommandLineFlags::boolAtPut((char*) name, (bool*) value, INTERNAL); 3989 return is_get ? CommandLineFlags::boolAt((char*) name, (bool*) value) : CommandLineFlags::boolAtPut((char*) name, (bool*) value, Flag::INTERNAL);
4242 JVM_END 3990 JVM_END
4243 3991
4244 JVM_LEAF(jboolean, JVM_AccessVMIntFlag(const char* name, jint* value, jboolean is_get)) 3992 JVM_LEAF(jboolean, JVM_AccessVMIntFlag(const char* name, jint* value, jboolean is_get))
4245 JVMWrapper("JVM_AccessVMIntFlag"); 3993 JVMWrapper("JVM_AccessVMIntFlag");
4246 intx v; 3994 intx v;
4247 jboolean result = is_get ? CommandLineFlags::intxAt((char*) name, &v) : CommandLineFlags::intxAtPut((char*) name, &v, INTERNAL); 3995 jboolean result = is_get ? CommandLineFlags::intxAt((char*) name, &v) : CommandLineFlags::intxAtPut((char*) name, &v, Flag::INTERNAL);
4248 *value = (jint)v; 3996 *value = (jint)v;
4249 return result; 3997 return result;
4250 JVM_END 3998 JVM_END
4251 3999
4252 4000