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 1025 : imported patch 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 
 172   for (int len = -1; len != _ci_objects->length(); ) {
 173     len = _ci_objects->length();
 174     for (int i2 = 0; i2 < len; i2++) {
 175       ciObject* obj = _ci_objects->at(i2);


 314       } else {
 315         assert(o == Universe::klassKlassObj(), "bad klassKlass");
 316         return new (arena()) ciKlassKlass(h_k);
 317       }
 318     }
 319   } else if (o->is_method()) {
 320     methodHandle h_m(THREAD, (methodOop)o);
 321     return new (arena()) ciMethod(h_m);
 322   } else if (o->is_methodData()) {
 323     methodDataHandle h_md(THREAD, (methodDataOop)o);
 324     return new (arena()) ciMethodData(h_md);
 325   } else if (o->is_instance()) {
 326     instanceHandle h_i(THREAD, (instanceOop)o);
 327     return new (arena()) ciInstance(h_i);
 328   } else if (o->is_objArray()) {
 329     objArrayHandle h_oa(THREAD, (objArrayOop)o);
 330     return new (arena()) ciObjArray(h_oa);
 331   } else if (o->is_typeArray()) {
 332     typeArrayHandle h_ta(THREAD, (typeArrayOop)o);
 333     return new (arena()) ciTypeArray(h_ta);



 334   }
 335 
 336   // The oop is of some type not supported by the compiler interface.
 337   ShouldNotReachHere();
 338   return NULL;
 339 }
 340 
 341 //------------------------------------------------------------------
 342 // ciObjectFactory::get_unloaded_method
 343 //
 344 // Get the ciMethod representing an unloaded/unfound method.
 345 //
 346 // Implementation note: unloaded methods are currently stored in
 347 // an unordered array, requiring a linear-time lookup for each
 348 // unloaded method.  This may need to change.
 349 ciMethod* ciObjectFactory::get_unloaded_method(ciInstanceKlass* holder,
 350                                                ciSymbol*        name,
 351                                                ciSymbol*        signature) {
 352   for (int i=0; i<_unloaded_methods->length(); i++) {
 353     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 
 176   for (int len = -1; len != _ci_objects->length(); ) {
 177     len = _ci_objects->length();
 178     for (int i2 = 0; i2 < len; i2++) {
 179       ciObject* obj = _ci_objects->at(i2);


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