src/share/vm/ci/ciObjectFactory.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 6829187 Sdiff src/share/vm/ci

src/share/vm/ci/ciObjectFactory.cpp

Print this page
rev 1082 : [mq]: indy.compiler.patch


 136   ciEnv::_klass_klass_instance =
 137     get(Universe::klassKlassObj())->as_klass_klass();
 138   ciEnv::_instance_klass_klass_instance =
 139     get(Universe::instanceKlassKlassObj())
 140       ->as_instance_klass_klass();
 141   ciEnv::_type_array_klass_klass_instance =
 142     get(Universe::typeArrayKlassKlassObj())
 143       ->as_type_array_klass_klass();
 144   ciEnv::_obj_array_klass_klass_instance =
 145     get(Universe::objArrayKlassKlassObj())
 146       ->as_obj_array_klass_klass();
 147   ciEnv::_ArrayStoreException =
 148     get(SystemDictionary::ArrayStoreException_klass())
 149       ->as_instance_klass();
 150   ciEnv::_Class =
 151     get(SystemDictionary::class_klass())
 152       ->as_instance_klass();
 153   ciEnv::_ClassCastException =
 154     get(SystemDictionary::ClassCastException_klass())
 155       ->as_instance_klass();




 156   ciEnv::_Object =
 157     get(SystemDictionary::object_klass())
 158       ->as_instance_klass();
 159   ciEnv::_Throwable =
 160     get(SystemDictionary::throwable_klass())
 161       ->as_instance_klass();
 162   ciEnv::_Thread =
 163     get(SystemDictionary::thread_klass())
 164       ->as_instance_klass();
 165   ciEnv::_OutOfMemoryError =
 166     get(SystemDictionary::OutOfMemoryError_klass())
 167       ->as_instance_klass();
 168   ciEnv::_String =
 169     get(SystemDictionary::string_klass())
 170       ->as_instance_klass();
 171   ciEnv::_StringBuffer =
 172     get(SystemDictionary::stringBuffer_klass())
 173       ->as_instance_klass();
 174   ciEnv::_StringBuilder =
 175     get(SystemDictionary::StringBuilder_klass())


 323       } else {
 324         assert(o == Universe::klassKlassObj(), "bad klassKlass");
 325         return new (arena()) ciKlassKlass(h_k);
 326       }
 327     }
 328   } else if (o->is_method()) {
 329     methodHandle h_m(THREAD, (methodOop)o);
 330     return new (arena()) ciMethod(h_m);
 331   } else if (o->is_methodData()) {
 332     methodDataHandle h_md(THREAD, (methodDataOop)o);
 333     return new (arena()) ciMethodData(h_md);
 334   } else if (o->is_instance()) {
 335     instanceHandle h_i(THREAD, (instanceOop)o);
 336     return new (arena()) ciInstance(h_i);
 337   } else if (o->is_objArray()) {
 338     objArrayHandle h_oa(THREAD, (objArrayOop)o);
 339     return new (arena()) ciObjArray(h_oa);
 340   } else if (o->is_typeArray()) {
 341     typeArrayHandle h_ta(THREAD, (typeArrayOop)o);
 342     return new (arena()) ciTypeArray(h_ta);



 343   }
 344 
 345   // The oop is of some type not supported by the compiler interface.
 346   ShouldNotReachHere();
 347   return NULL;
 348 }
 349 
 350 //------------------------------------------------------------------
 351 // ciObjectFactory::get_unloaded_method
 352 //
 353 // Get the ciMethod representing an unloaded/unfound method.
 354 //
 355 // Implementation note: unloaded methods are currently stored in
 356 // an unordered array, requiring a linear-time lookup for each
 357 // unloaded method.  This may need to change.
 358 ciMethod* ciObjectFactory::get_unloaded_method(ciInstanceKlass* holder,
 359                                                ciSymbol*        name,
 360                                                ciSymbol*        signature) {
 361   for (int i=0; i<_unloaded_methods->length(); i++) {
 362     ciMethod* entry = _unloaded_methods->at(i);




 136   ciEnv::_klass_klass_instance =
 137     get(Universe::klassKlassObj())->as_klass_klass();
 138   ciEnv::_instance_klass_klass_instance =
 139     get(Universe::instanceKlassKlassObj())
 140       ->as_instance_klass_klass();
 141   ciEnv::_type_array_klass_klass_instance =
 142     get(Universe::typeArrayKlassKlassObj())
 143       ->as_type_array_klass_klass();
 144   ciEnv::_obj_array_klass_klass_instance =
 145     get(Universe::objArrayKlassKlassObj())
 146       ->as_obj_array_klass_klass();
 147   ciEnv::_ArrayStoreException =
 148     get(SystemDictionary::ArrayStoreException_klass())
 149       ->as_instance_klass();
 150   ciEnv::_Class =
 151     get(SystemDictionary::class_klass())
 152       ->as_instance_klass();
 153   ciEnv::_ClassCastException =
 154     get(SystemDictionary::ClassCastException_klass())
 155       ->as_instance_klass();
 156   if (EnableInvokeDynamic) {
 157     ciEnv::_InvokeDynamic =
 158       get(SystemDictionary::InvokeDynamic_klass())->as_instance_klass();
 159   }
 160   ciEnv::_Object =
 161     get(SystemDictionary::object_klass())
 162       ->as_instance_klass();
 163   ciEnv::_Throwable =
 164     get(SystemDictionary::throwable_klass())
 165       ->as_instance_klass();
 166   ciEnv::_Thread =
 167     get(SystemDictionary::thread_klass())
 168       ->as_instance_klass();
 169   ciEnv::_OutOfMemoryError =
 170     get(SystemDictionary::OutOfMemoryError_klass())
 171       ->as_instance_klass();
 172   ciEnv::_String =
 173     get(SystemDictionary::string_klass())
 174       ->as_instance_klass();
 175   ciEnv::_StringBuffer =
 176     get(SystemDictionary::stringBuffer_klass())
 177       ->as_instance_klass();
 178   ciEnv::_StringBuilder =
 179     get(SystemDictionary::StringBuilder_klass())


 327       } else {
 328         assert(o == Universe::klassKlassObj(), "bad klassKlass");
 329         return new (arena()) ciKlassKlass(h_k);
 330       }
 331     }
 332   } else if (o->is_method()) {
 333     methodHandle h_m(THREAD, (methodOop)o);
 334     return new (arena()) ciMethod(h_m);
 335   } else if (o->is_methodData()) {
 336     methodDataHandle h_md(THREAD, (methodDataOop)o);
 337     return new (arena()) ciMethodData(h_md);
 338   } else if (o->is_instance()) {
 339     instanceHandle h_i(THREAD, (instanceOop)o);
 340     return new (arena()) ciInstance(h_i);
 341   } else if (o->is_objArray()) {
 342     objArrayHandle h_oa(THREAD, (objArrayOop)o);
 343     return new (arena()) ciObjArray(h_oa);
 344   } else if (o->is_typeArray()) {
 345     typeArrayHandle h_ta(THREAD, (typeArrayOop)o);
 346     return new (arena()) ciTypeArray(h_ta);
 347   } else if (o->is_constantPoolCache()) {
 348     constantPoolCacheHandle h_cpc(THREAD, (constantPoolCacheOop) o);
 349     return new (arena()) ciCPCache(h_cpc);
 350   }
 351 
 352   // The oop is of some type not supported by the compiler interface.
 353   ShouldNotReachHere();
 354   return NULL;
 355 }
 356 
 357 //------------------------------------------------------------------
 358 // ciObjectFactory::get_unloaded_method
 359 //
 360 // Get the ciMethod representing an unloaded/unfound method.
 361 //
 362 // Implementation note: unloaded methods are currently stored in
 363 // an unordered array, requiring a linear-time lookup for each
 364 // unloaded method.  This may need to change.
 365 ciMethod* ciObjectFactory::get_unloaded_method(ciInstanceKlass* holder,
 366                                                ciSymbol*        name,
 367                                                ciSymbol*        signature) {
 368   for (int i=0; i<_unloaded_methods->length(); i++) {
 369     ciMethod* entry = _unloaded_methods->at(i);


src/share/vm/ci/ciObjectFactory.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File