< prev index next >

src/share/vm/classfile/javaClasses.hpp

Print this page
rev 7800 : [mq]: cleanupOopInlineHpp


 187     return h;
 188   }
 189   static unsigned int hash_code(oop java_string);
 190 
 191   // This is the string hash code used by the StringTable, which may be
 192   // the same as String.hashCode or an alternate hash code.
 193   static unsigned int hash_string(oop java_string);
 194 
 195   static bool equals(oop java_string, jchar* chars, int len);
 196   static bool equals(oop str1, oop str2);
 197 
 198   // Conversion between '.' and '/' formats
 199   static Handle externalize_classname(Handle java_string, TRAPS) { return char_converter(java_string, '/', '.', THREAD); }
 200   static Handle internalize_classname(Handle java_string, TRAPS) { return char_converter(java_string, '.', '/', THREAD); }
 201 
 202   // Conversion
 203   static Symbol* as_symbol(Handle java_string, TRAPS);
 204   static Symbol* as_symbol_or_null(oop java_string);
 205 
 206   // Testers
 207   static bool is_instance(oop obj) {
 208     return obj != NULL && obj->klass() == SystemDictionary::String_klass();
 209   }
 210 
 211   // Debugging
 212   static void print(oop java_string, outputStream* st);
 213   friend class JavaClasses;
 214 };
 215 
 216 
 217 // Interface to java.lang.Class objects
 218 
 219 #define CLASS_INJECTED_FIELDS(macro)                                       \
 220   macro(java_lang_Class, klass,                  intptr_signature,  false) \
 221   macro(java_lang_Class, array_klass,            intptr_signature,  false) \
 222   macro(java_lang_Class, oop_size,               int_signature,     false) \
 223   macro(java_lang_Class, static_oop_field_count, int_signature,     false) \
 224   macro(java_lang_Class, protection_domain,      object_signature,  false) \
 225   macro(java_lang_Class, signers,                object_signature,  false)
 226 
 227 class java_lang_Class : AllStatic {
 228   friend class VMStructs;
 229 


 256   static void compute_offsets();
 257 
 258   // Instance creation
 259   static void create_mirror(KlassHandle k, Handle class_loader,
 260                             Handle protection_domain, TRAPS);
 261   static void fixup_mirror(KlassHandle k, TRAPS);
 262   static oop  create_basic_type_mirror(const char* basic_type_name, BasicType type, TRAPS);
 263   // Conversion
 264   static Klass* as_Klass(oop java_class);
 265   static void set_klass(oop java_class, Klass* klass);
 266   static BasicType as_BasicType(oop java_class, Klass** reference_klass = NULL);
 267   static BasicType as_BasicType(oop java_class, KlassHandle* reference_klass) {
 268     Klass* refk_oop = NULL;
 269     BasicType result = as_BasicType(java_class, &refk_oop);
 270     (*reference_klass) = KlassHandle(refk_oop);
 271     return result;
 272   }
 273   static Symbol* as_signature(oop java_class, bool intern_if_not_found, TRAPS);
 274   static void print_signature(oop java_class, outputStream *st);
 275   // Testing
 276   static bool is_instance(oop obj) {
 277     return obj != NULL && obj->klass() == SystemDictionary::Class_klass();
 278   }
 279   static bool is_primitive(oop java_class);
 280   static BasicType primitive_type(oop java_class);
 281   static oop primitive_mirror(BasicType t);
 282   // JVM_NewArray support
 283   static Klass* array_klass(oop java_class);
 284   static void set_array_klass(oop java_class, Klass* klass);
 285   // compiler support for class operations
 286   static int klass_offset_in_bytes()                { return _klass_offset; }
 287   static int array_klass_offset_in_bytes()          { return _array_klass_offset; }
 288   // Support for classRedefinedCount field
 289   static int classRedefinedCount(oop the_class_mirror);
 290   static void set_classRedefinedCount(oop the_class_mirror, int value);
 291 
 292   // Support for embedded per-class oops
 293   static oop  protection_domain(oop java_class);
 294   static oop  init_lock(oop java_class);
 295   static oop  component_mirror(oop java_class);
 296   static objArrayOop  signers(oop java_class);
 297   static void set_signers(oop java_class, objArrayOop signers);
 298 


 972   friend class JavaClasses;
 973 
 974  private:
 975   static int _type_offset;               // the MethodType of this MH
 976   static int _form_offset;               // the LambdaForm of this MH
 977 
 978   static void compute_offsets();
 979 
 980  public:
 981   // Accessors
 982   static oop            type(oop mh);
 983   static void       set_type(oop mh, oop mtype);
 984 
 985   static oop            form(oop mh);
 986   static void       set_form(oop mh, oop lform);
 987 
 988   // Testers
 989   static bool is_subclass(Klass* klass) {
 990     return klass->is_subclass_of(SystemDictionary::MethodHandle_klass());
 991   }
 992   static bool is_instance(oop obj) {
 993     return obj != NULL && is_subclass(obj->klass());
 994   }
 995 
 996   // Accessors for code generation:
 997   static int type_offset_in_bytes()             { return _type_offset; }
 998   static int form_offset_in_bytes()             { return _form_offset; }
 999 };
1000 
1001 // Interface to java.lang.invoke.DirectMethodHandle objects
1002 
1003 class java_lang_invoke_DirectMethodHandle: AllStatic {
1004   friend class JavaClasses;
1005 
1006  private:
1007   static int _member_offset;               // the MemberName of this DMH
1008 
1009   static void compute_offsets();
1010 
1011  public:
1012   // Accessors
1013   static oop  member(oop mh);
1014 
1015   // Testers
1016   static bool is_subclass(Klass* klass) {
1017     return klass->is_subclass_of(SystemDictionary::DirectMethodHandle_klass());
1018   }
1019   static bool is_instance(oop obj) {
1020     return obj != NULL && is_subclass(obj->klass());
1021   }
1022 
1023   // Accessors for code generation:
1024   static int member_offset_in_bytes()           { return _member_offset; }
1025 };
1026 
1027 // Interface to java.lang.invoke.LambdaForm objects
1028 // (These are a private interface for managing adapter code generation.)
1029 
1030 class java_lang_invoke_LambdaForm: AllStatic {
1031   friend class JavaClasses;
1032 
1033  private:
1034   static int _vmentry_offset;  // type is MemberName
1035 
1036   static void compute_offsets();
1037 
1038  public:
1039   // Accessors
1040   static oop            vmentry(oop lform);
1041   static void       set_vmentry(oop lform, oop invoker);
1042 
1043   // Testers
1044   static bool is_subclass(Klass* klass) {
1045     return SystemDictionary::LambdaForm_klass() != NULL &&
1046       klass->is_subclass_of(SystemDictionary::LambdaForm_klass());
1047   }
1048   static bool is_instance(oop obj) {
1049     return obj != NULL && is_subclass(obj->klass());
1050   }
1051 
1052   // Accessors for code generation:
1053   static int vmentry_offset_in_bytes()          { return _vmentry_offset; }
1054 };
1055 
1056 
1057 // Interface to java.lang.invoke.MemberName objects
1058 // (These are a private interface for Java code to query the class hierarchy.)
1059 
1060 #define MEMBERNAME_INJECTED_FIELDS(macro)                               \
1061   macro(java_lang_invoke_MemberName, vmloader, object_signature, false) \
1062   macro(java_lang_invoke_MemberName, vmindex,  intptr_signature, false) \
1063   macro(java_lang_invoke_MemberName, vmtarget, intptr_signature, false)
1064 
1065 class java_lang_invoke_MemberName: AllStatic {
1066   friend class JavaClasses;
1067 
1068  private:
1069   // From java.lang.invoke.MemberName:
1070   //    private Class<?>   clazz;       // class in which the method is defined


1094   static oop            name(oop mname);
1095   static void       set_name(oop mname, oop name);
1096 
1097   static int            flags(oop mname);
1098   static void       set_flags(oop mname, int flags);
1099 
1100   static Metadata*      vmtarget(oop mname);
1101   static void       set_vmtarget(oop mname, Metadata* target);
1102 #if INCLUDE_JVMTI
1103   static void       adjust_vmtarget(oop mname, Method* old_method, Method* new_method,
1104                                     bool* trace_name_printed);
1105 #endif // INCLUDE_JVMTI
1106 
1107   static intptr_t       vmindex(oop mname);
1108   static void       set_vmindex(oop mname, intptr_t index);
1109 
1110   // Testers
1111   static bool is_subclass(Klass* klass) {
1112     return klass->is_subclass_of(SystemDictionary::MemberName_klass());
1113   }
1114   static bool is_instance(oop obj) {
1115     return obj != NULL && is_subclass(obj->klass());
1116   }
1117 
1118   static bool is_method(oop obj);
1119 
1120   // Relevant integer codes (keep these in synch. with MethodHandleNatives.Constants):
1121   enum {
1122     MN_IS_METHOD            = 0x00010000, // method (not constructor)
1123     MN_IS_CONSTRUCTOR       = 0x00020000, // constructor
1124     MN_IS_FIELD             = 0x00040000, // field
1125     MN_IS_TYPE              = 0x00080000, // nested type
1126     MN_CALLER_SENSITIVE     = 0x00100000, // @CallerSensitive annotation detected
1127     MN_REFERENCE_KIND_SHIFT = 24, // refKind
1128     MN_REFERENCE_KIND_MASK  = 0x0F000000 >> MN_REFERENCE_KIND_SHIFT,
1129     // The SEARCH_* bits are not for MN.flags but for the matchFlags argument of MHN.getMembers:
1130     MN_SEARCH_SUPERCLASSES  = 0x00100000, // walk super classes
1131     MN_SEARCH_INTERFACES    = 0x00200000  // walk implemented interfaces
1132   };
1133 
1134   // Accessors for code generation:
1135   static int clazz_offset_in_bytes()            { return _clazz_offset; }
1136   static int type_offset_in_bytes()             { return _type_offset; }


1149  private:
1150   static int _rtype_offset;
1151   static int _ptypes_offset;
1152 
1153   static void compute_offsets();
1154 
1155  public:
1156   // Accessors
1157   static oop            rtype(oop mt);
1158   static objArrayOop    ptypes(oop mt);
1159 
1160   static oop            ptype(oop mt, int index);
1161   static int            ptype_count(oop mt);
1162 
1163   static int            ptype_slot_count(oop mt);  // extra counts for long/double
1164   static int            rtype_slot_count(oop mt);  // extra counts for long/double
1165 
1166   static Symbol*        as_signature(oop mt, bool intern_if_not_found, TRAPS);
1167   static void           print_signature(oop mt, outputStream* st);
1168 
1169   static bool is_instance(oop obj) {
1170     return obj != NULL && obj->klass() == SystemDictionary::MethodType_klass();
1171   }
1172 
1173   static bool equals(oop mt1, oop mt2);
1174 
1175   // Accessors for code generation:
1176   static int rtype_offset_in_bytes()            { return _rtype_offset; }
1177   static int ptypes_offset_in_bytes()           { return _ptypes_offset; }
1178 };
1179 
1180 
1181 // Interface to java.lang.invoke.CallSite objects
1182 
1183 class java_lang_invoke_CallSite: AllStatic {
1184   friend class JavaClasses;
1185 
1186 private:
1187   static int _target_offset;
1188 
1189   static void compute_offsets();
1190 
1191 public:
1192   // Accessors
1193   static oop              target(         oop site)             { return site->obj_field(             _target_offset);         }
1194   static void         set_target(         oop site, oop target) {        site->obj_field_put(         _target_offset, target); }
1195 
1196   static volatile oop     target_volatile(oop site)             { return oop((oopDesc *)(site->obj_field_volatile(_target_offset))); }
1197   static void         set_target_volatile(oop site, oop target) {        site->obj_field_put_volatile(_target_offset, target); }
1198 
1199   // Testers
1200   static bool is_subclass(Klass* klass) {
1201     return klass->is_subclass_of(SystemDictionary::CallSite_klass());
1202   }
1203   static bool is_instance(oop obj) {
1204     return obj != NULL && is_subclass(obj->klass());
1205   }
1206 
1207   // Accessors for code generation:
1208   static int target_offset_in_bytes()           { return _target_offset; }
1209 };
1210 
1211 
1212 // Interface to java.security.AccessControlContext objects
1213 
1214 class java_security_AccessControlContext: AllStatic {
1215  private:
1216   // Note that for this class the layout changed between JDK1.2 and JDK1.3,
1217   // so we compute the offsets at startup rather than hard-wiring them.
1218   static int _context_offset;
1219   static int _privilegedContext_offset;
1220   static int _isPrivileged_offset;
1221   static int _isAuthorized_offset;
1222 
1223   static void compute_offsets();
1224  public:
1225   static oop create(objArrayHandle context, bool isPrivileged, Handle privileged_context, TRAPS);


1251   static void compute_offsets();
1252 
1253   static ClassLoaderData** loader_data_addr(oop loader);
1254   static ClassLoaderData* loader_data(oop loader);
1255 
1256   static oop parent(oop loader);
1257   static bool isAncestor(oop loader, oop cl);
1258 
1259   // Support for parallelCapable field
1260   static bool parallelCapable(oop the_class_mirror);
1261 
1262   static bool is_trusted_loader(oop loader);
1263 
1264   // Fix for 4474172
1265   static oop  non_reflection_class_loader(oop loader);
1266 
1267   // Testers
1268   static bool is_subclass(Klass* klass) {
1269     return klass->is_subclass_of(SystemDictionary::ClassLoader_klass());
1270   }
1271   static bool is_instance(oop obj) {
1272     return obj != NULL && is_subclass(obj->klass());
1273   }
1274 
1275   // Debugging
1276   friend class JavaClasses;
1277   friend class ClassFileParser; // access to number_of_fake_fields
1278 };
1279 
1280 
1281 // Interface to java.lang.System objects
1282 
1283 class java_lang_System : AllStatic {
1284  private:
1285   enum {
1286    hc_static_in_offset  = 0,
1287    hc_static_out_offset = 1,
1288    hc_static_err_offset = 2,
1289    hc_static_security_offset = 3
1290   };
1291 
1292   static int  static_in_offset;
1293   static int static_out_offset;




 187     return h;
 188   }
 189   static unsigned int hash_code(oop java_string);
 190 
 191   // This is the string hash code used by the StringTable, which may be
 192   // the same as String.hashCode or an alternate hash code.
 193   static unsigned int hash_string(oop java_string);
 194 
 195   static bool equals(oop java_string, jchar* chars, int len);
 196   static bool equals(oop str1, oop str2);
 197 
 198   // Conversion between '.' and '/' formats
 199   static Handle externalize_classname(Handle java_string, TRAPS) { return char_converter(java_string, '/', '.', THREAD); }
 200   static Handle internalize_classname(Handle java_string, TRAPS) { return char_converter(java_string, '.', '/', THREAD); }
 201 
 202   // Conversion
 203   static Symbol* as_symbol(Handle java_string, TRAPS);
 204   static Symbol* as_symbol_or_null(oop java_string);
 205 
 206   // Testers
 207   static bool is_instance(oop obj);
 208   static bool is_instance_inlined(oop obj);

 209 
 210   // Debugging
 211   static void print(oop java_string, outputStream* st);
 212   friend class JavaClasses;
 213 };
 214 
 215 
 216 // Interface to java.lang.Class objects
 217 
 218 #define CLASS_INJECTED_FIELDS(macro)                                       \
 219   macro(java_lang_Class, klass,                  intptr_signature,  false) \
 220   macro(java_lang_Class, array_klass,            intptr_signature,  false) \
 221   macro(java_lang_Class, oop_size,               int_signature,     false) \
 222   macro(java_lang_Class, static_oop_field_count, int_signature,     false) \
 223   macro(java_lang_Class, protection_domain,      object_signature,  false) \
 224   macro(java_lang_Class, signers,                object_signature,  false)
 225 
 226 class java_lang_Class : AllStatic {
 227   friend class VMStructs;
 228 


 255   static void compute_offsets();
 256 
 257   // Instance creation
 258   static void create_mirror(KlassHandle k, Handle class_loader,
 259                             Handle protection_domain, TRAPS);
 260   static void fixup_mirror(KlassHandle k, TRAPS);
 261   static oop  create_basic_type_mirror(const char* basic_type_name, BasicType type, TRAPS);
 262   // Conversion
 263   static Klass* as_Klass(oop java_class);
 264   static void set_klass(oop java_class, Klass* klass);
 265   static BasicType as_BasicType(oop java_class, Klass** reference_klass = NULL);
 266   static BasicType as_BasicType(oop java_class, KlassHandle* reference_klass) {
 267     Klass* refk_oop = NULL;
 268     BasicType result = as_BasicType(java_class, &refk_oop);
 269     (*reference_klass) = KlassHandle(refk_oop);
 270     return result;
 271   }
 272   static Symbol* as_signature(oop java_class, bool intern_if_not_found, TRAPS);
 273   static void print_signature(oop java_class, outputStream *st);
 274   // Testing
 275   static bool is_instance(oop obj);
 276 

 277   static bool is_primitive(oop java_class);
 278   static BasicType primitive_type(oop java_class);
 279   static oop primitive_mirror(BasicType t);
 280   // JVM_NewArray support
 281   static Klass* array_klass(oop java_class);
 282   static void set_array_klass(oop java_class, Klass* klass);
 283   // compiler support for class operations
 284   static int klass_offset_in_bytes()                { return _klass_offset; }
 285   static int array_klass_offset_in_bytes()          { return _array_klass_offset; }
 286   // Support for classRedefinedCount field
 287   static int classRedefinedCount(oop the_class_mirror);
 288   static void set_classRedefinedCount(oop the_class_mirror, int value);
 289 
 290   // Support for embedded per-class oops
 291   static oop  protection_domain(oop java_class);
 292   static oop  init_lock(oop java_class);
 293   static oop  component_mirror(oop java_class);
 294   static objArrayOop  signers(oop java_class);
 295   static void set_signers(oop java_class, objArrayOop signers);
 296 


 970   friend class JavaClasses;
 971 
 972  private:
 973   static int _type_offset;               // the MethodType of this MH
 974   static int _form_offset;               // the LambdaForm of this MH
 975 
 976   static void compute_offsets();
 977 
 978  public:
 979   // Accessors
 980   static oop            type(oop mh);
 981   static void       set_type(oop mh, oop mtype);
 982 
 983   static oop            form(oop mh);
 984   static void       set_form(oop mh, oop lform);
 985 
 986   // Testers
 987   static bool is_subclass(Klass* klass) {
 988     return klass->is_subclass_of(SystemDictionary::MethodHandle_klass());
 989   }
 990   static bool is_instance(oop obj);


 991 
 992   // Accessors for code generation:
 993   static int type_offset_in_bytes()             { return _type_offset; }
 994   static int form_offset_in_bytes()             { return _form_offset; }
 995 };
 996 
 997 // Interface to java.lang.invoke.DirectMethodHandle objects
 998 
 999 class java_lang_invoke_DirectMethodHandle: AllStatic {
1000   friend class JavaClasses;
1001 
1002  private:
1003   static int _member_offset;               // the MemberName of this DMH
1004 
1005   static void compute_offsets();
1006 
1007  public:
1008   // Accessors
1009   static oop  member(oop mh);
1010 
1011   // Testers
1012   static bool is_subclass(Klass* klass) {
1013     return klass->is_subclass_of(SystemDictionary::DirectMethodHandle_klass());
1014   }
1015   static bool is_instance(oop obj);


1016 
1017   // Accessors for code generation:
1018   static int member_offset_in_bytes()           { return _member_offset; }
1019 };
1020 
1021 // Interface to java.lang.invoke.LambdaForm objects
1022 // (These are a private interface for managing adapter code generation.)
1023 
1024 class java_lang_invoke_LambdaForm: AllStatic {
1025   friend class JavaClasses;
1026 
1027  private:
1028   static int _vmentry_offset;  // type is MemberName
1029 
1030   static void compute_offsets();
1031 
1032  public:
1033   // Accessors
1034   static oop            vmentry(oop lform);
1035   static void       set_vmentry(oop lform, oop invoker);
1036 
1037   // Testers
1038   static bool is_subclass(Klass* klass) {
1039     return SystemDictionary::LambdaForm_klass() != NULL &&
1040       klass->is_subclass_of(SystemDictionary::LambdaForm_klass());
1041   }
1042   static bool is_instance(oop obj);


1043 
1044   // Accessors for code generation:
1045   static int vmentry_offset_in_bytes()          { return _vmentry_offset; }
1046 };
1047 
1048 
1049 // Interface to java.lang.invoke.MemberName objects
1050 // (These are a private interface for Java code to query the class hierarchy.)
1051 
1052 #define MEMBERNAME_INJECTED_FIELDS(macro)                               \
1053   macro(java_lang_invoke_MemberName, vmloader, object_signature, false) \
1054   macro(java_lang_invoke_MemberName, vmindex,  intptr_signature, false) \
1055   macro(java_lang_invoke_MemberName, vmtarget, intptr_signature, false)
1056 
1057 class java_lang_invoke_MemberName: AllStatic {
1058   friend class JavaClasses;
1059 
1060  private:
1061   // From java.lang.invoke.MemberName:
1062   //    private Class<?>   clazz;       // class in which the method is defined


1086   static oop            name(oop mname);
1087   static void       set_name(oop mname, oop name);
1088 
1089   static int            flags(oop mname);
1090   static void       set_flags(oop mname, int flags);
1091 
1092   static Metadata*      vmtarget(oop mname);
1093   static void       set_vmtarget(oop mname, Metadata* target);
1094 #if INCLUDE_JVMTI
1095   static void       adjust_vmtarget(oop mname, Method* old_method, Method* new_method,
1096                                     bool* trace_name_printed);
1097 #endif // INCLUDE_JVMTI
1098 
1099   static intptr_t       vmindex(oop mname);
1100   static void       set_vmindex(oop mname, intptr_t index);
1101 
1102   // Testers
1103   static bool is_subclass(Klass* klass) {
1104     return klass->is_subclass_of(SystemDictionary::MemberName_klass());
1105   }
1106   static bool is_instance(oop obj);


1107 
1108   static bool is_method(oop obj);
1109 
1110   // Relevant integer codes (keep these in synch. with MethodHandleNatives.Constants):
1111   enum {
1112     MN_IS_METHOD            = 0x00010000, // method (not constructor)
1113     MN_IS_CONSTRUCTOR       = 0x00020000, // constructor
1114     MN_IS_FIELD             = 0x00040000, // field
1115     MN_IS_TYPE              = 0x00080000, // nested type
1116     MN_CALLER_SENSITIVE     = 0x00100000, // @CallerSensitive annotation detected
1117     MN_REFERENCE_KIND_SHIFT = 24, // refKind
1118     MN_REFERENCE_KIND_MASK  = 0x0F000000 >> MN_REFERENCE_KIND_SHIFT,
1119     // The SEARCH_* bits are not for MN.flags but for the matchFlags argument of MHN.getMembers:
1120     MN_SEARCH_SUPERCLASSES  = 0x00100000, // walk super classes
1121     MN_SEARCH_INTERFACES    = 0x00200000  // walk implemented interfaces
1122   };
1123 
1124   // Accessors for code generation:
1125   static int clazz_offset_in_bytes()            { return _clazz_offset; }
1126   static int type_offset_in_bytes()             { return _type_offset; }


1139  private:
1140   static int _rtype_offset;
1141   static int _ptypes_offset;
1142 
1143   static void compute_offsets();
1144 
1145  public:
1146   // Accessors
1147   static oop            rtype(oop mt);
1148   static objArrayOop    ptypes(oop mt);
1149 
1150   static oop            ptype(oop mt, int index);
1151   static int            ptype_count(oop mt);
1152 
1153   static int            ptype_slot_count(oop mt);  // extra counts for long/double
1154   static int            rtype_slot_count(oop mt);  // extra counts for long/double
1155 
1156   static Symbol*        as_signature(oop mt, bool intern_if_not_found, TRAPS);
1157   static void           print_signature(oop mt, outputStream* st);
1158 
1159   static bool is_instance(oop obj);


1160 
1161   static bool equals(oop mt1, oop mt2);
1162 
1163   // Accessors for code generation:
1164   static int rtype_offset_in_bytes()            { return _rtype_offset; }
1165   static int ptypes_offset_in_bytes()           { return _ptypes_offset; }
1166 };
1167 
1168 
1169 // Interface to java.lang.invoke.CallSite objects
1170 
1171 class java_lang_invoke_CallSite: AllStatic {
1172   friend class JavaClasses;
1173 
1174 private:
1175   static int _target_offset;
1176 
1177   static void compute_offsets();
1178 
1179 public:
1180   // Accessors
1181   static oop              target(         oop site);
1182   static void         set_target(         oop site, oop target);
1183 
1184   static volatile oop     target_volatile(oop site);
1185   static void         set_target_volatile(oop site, oop target);
1186 
1187   // Testers
1188   static bool is_subclass(Klass* klass) {
1189     return klass->is_subclass_of(SystemDictionary::CallSite_klass());
1190   }
1191   static bool is_instance(oop obj);


1192 
1193   // Accessors for code generation:
1194   static int target_offset_in_bytes()           { return _target_offset; }
1195 };
1196 
1197 
1198 // Interface to java.security.AccessControlContext objects
1199 
1200 class java_security_AccessControlContext: AllStatic {
1201  private:
1202   // Note that for this class the layout changed between JDK1.2 and JDK1.3,
1203   // so we compute the offsets at startup rather than hard-wiring them.
1204   static int _context_offset;
1205   static int _privilegedContext_offset;
1206   static int _isPrivileged_offset;
1207   static int _isAuthorized_offset;
1208 
1209   static void compute_offsets();
1210  public:
1211   static oop create(objArrayHandle context, bool isPrivileged, Handle privileged_context, TRAPS);


1237   static void compute_offsets();
1238 
1239   static ClassLoaderData** loader_data_addr(oop loader);
1240   static ClassLoaderData* loader_data(oop loader);
1241 
1242   static oop parent(oop loader);
1243   static bool isAncestor(oop loader, oop cl);
1244 
1245   // Support for parallelCapable field
1246   static bool parallelCapable(oop the_class_mirror);
1247 
1248   static bool is_trusted_loader(oop loader);
1249 
1250   // Fix for 4474172
1251   static oop  non_reflection_class_loader(oop loader);
1252 
1253   // Testers
1254   static bool is_subclass(Klass* klass) {
1255     return klass->is_subclass_of(SystemDictionary::ClassLoader_klass());
1256   }
1257   static bool is_instance(oop obj);


1258 
1259   // Debugging
1260   friend class JavaClasses;
1261   friend class ClassFileParser; // access to number_of_fake_fields
1262 };
1263 
1264 
1265 // Interface to java.lang.System objects
1266 
1267 class java_lang_System : AllStatic {
1268  private:
1269   enum {
1270    hc_static_in_offset  = 0,
1271    hc_static_out_offset = 1,
1272    hc_static_err_offset = 2,
1273    hc_static_security_offset = 3
1274   };
1275 
1276   static int  static_in_offset;
1277   static int static_out_offset;


< prev index next >