537 } 538 return false; 539 } 540 541 void ciInstanceKlass::compute_injected_fields() { 542 assert(is_loaded(), "must be loaded"); 543 544 int has_injected_fields = 0; 545 if (super() != NULL && super()->has_injected_fields()) { 546 has_injected_fields = 1; 547 } else { 548 GUARDED_VM_ENTRY({ 549 has_injected_fields = compute_injected_fields_helper() ? 1 : 0; 550 }); 551 } 552 // may be concurrently initialized for shared ciInstanceKlass objects 553 assert(_has_injected_fields == -1 || _has_injected_fields == has_injected_fields, "broken concurrent initialization"); 554 _has_injected_fields = has_injected_fields; 555 } 556 557 // ------------------------------------------------------------------ 558 // ciInstanceKlass::find_method 559 // 560 // Find a method in this klass. 561 ciMethod* ciInstanceKlass::find_method(ciSymbol* name, ciSymbol* signature) { 562 VM_ENTRY_MARK; 563 InstanceKlass* k = get_instanceKlass(); 564 Symbol* name_sym = name->get_symbol(); 565 Symbol* sig_sym= signature->get_symbol(); 566 567 Method* m = k->find_method(name_sym, sig_sym); 568 if (m == NULL) return NULL; 569 570 return CURRENT_THREAD_ENV->get_method(m); 571 } 572 573 // ------------------------------------------------------------------ 574 // ciInstanceKlass::is_leaf_type 575 bool ciInstanceKlass::is_leaf_type() { 576 assert(is_loaded(), "must be loaded"); | 537 } 538 return false; 539 } 540 541 void ciInstanceKlass::compute_injected_fields() { 542 assert(is_loaded(), "must be loaded"); 543 544 int has_injected_fields = 0; 545 if (super() != NULL && super()->has_injected_fields()) { 546 has_injected_fields = 1; 547 } else { 548 GUARDED_VM_ENTRY({ 549 has_injected_fields = compute_injected_fields_helper() ? 1 : 0; 550 }); 551 } 552 // may be concurrently initialized for shared ciInstanceKlass objects 553 assert(_has_injected_fields == -1 || _has_injected_fields == has_injected_fields, "broken concurrent initialization"); 554 _has_injected_fields = has_injected_fields; 555 } 556 557 bool ciInstanceKlass::has_object_fields() const { 558 GUARDED_VM_ENTRY( 559 return get_instanceKlass()->nonstatic_oop_map_size() > 0; 560 ); 561 } 562 563 // ------------------------------------------------------------------ 564 // ciInstanceKlass::find_method 565 // 566 // Find a method in this klass. 567 ciMethod* ciInstanceKlass::find_method(ciSymbol* name, ciSymbol* signature) { 568 VM_ENTRY_MARK; 569 InstanceKlass* k = get_instanceKlass(); 570 Symbol* name_sym = name->get_symbol(); 571 Symbol* sig_sym= signature->get_symbol(); 572 573 Method* m = k->find_method(name_sym, sig_sym); 574 if (m == NULL) return NULL; 575 576 return CURRENT_THREAD_ENV->get_method(m); 577 } 578 579 // ------------------------------------------------------------------ 580 // ciInstanceKlass::is_leaf_type 581 bool ciInstanceKlass::is_leaf_type() { 582 assert(is_loaded(), "must be loaded"); |