comparison src/share/vm/c1x/c1x_CodeInstaller.cpp @ 2050:b6d2c238e585

Two fixes for leaf type and leaf method assumptions.
author Thomas Wuerthinger <wuerthinger@ssw.jku.at>
date Tue, 11 Jan 2011 11:55:19 +0100
parents 7e09ea4a8f36
children 3c0a889a176b
comparison
equal deleted inserted replaced
2049:7e09ea4a8f36 2050:b6d2c238e585
301 oop type_oop = CiAssumptions_ConcreteSubtype::subtype(assumption); 301 oop type_oop = CiAssumptions_ConcreteSubtype::subtype(assumption);
302 302
303 ciKlass* context = (ciKlass*) CURRENT_ENV->get_object(java_lang_Class::as_klassOop(HotSpotTypeResolved::javaMirror(context_oop))); 303 ciKlass* context = (ciKlass*) CURRENT_ENV->get_object(java_lang_Class::as_klassOop(HotSpotTypeResolved::javaMirror(context_oop)));
304 ciKlass* type = (ciKlass*) CURRENT_ENV->get_object(java_lang_Class::as_klassOop(HotSpotTypeResolved::javaMirror(type_oop))); 304 ciKlass* type = (ciKlass*) CURRENT_ENV->get_object(java_lang_Class::as_klassOop(HotSpotTypeResolved::javaMirror(type_oop)));
305 305
306 if (context == type) { 306 _dependencies->assert_leaf_type(type);
307 _dependencies->assert_leaf_type(type); 307 if (context != type) {
308 } else {
309 assert(context->is_abstract(), ""); 308 assert(context->is_abstract(), "");
310 ThreadToNativeFromVM trans(JavaThread::current()); 309 ThreadToNativeFromVM trans(JavaThread::current());
311 _dependencies->assert_abstract_with_unique_concrete_subtype(context, type); 310 _dependencies->assert_abstract_with_unique_concrete_subtype(context, type);
312 } 311 }
313 } 312 }
321 methodOop context = VmIds::get<methodOop>(context_oop_id); 320 methodOop context = VmIds::get<methodOop>(context_oop_id);
322 321
323 ciMethod* m = (ciMethod*) CURRENT_ENV->get_object(method); 322 ciMethod* m = (ciMethod*) CURRENT_ENV->get_object(method);
324 ciMethod* c = (ciMethod*) CURRENT_ENV->get_object(context); 323 ciMethod* c = (ciMethod*) CURRENT_ENV->get_object(context);
325 ciKlass* context_klass = c->holder(); 324 ciKlass* context_klass = c->holder();
326 _dependencies->assert_unique_concrete_method(context_klass, m); 325 {
326 ThreadToNativeFromVM trans(JavaThread::current());
327 _dependencies->assert_unique_concrete_method(context_klass, m);
328 }
327 } 329 }
328 330
329 void CodeInstaller::process_exception_handlers() { 331 void CodeInstaller::process_exception_handlers() {
330 // allocate some arrays for use by the collection code. 332 // allocate some arrays for use by the collection code.
331 const int num_handlers = 5; 333 const int num_handlers = 5;