< prev index next >

src/share/vm/opto/macro.cpp

Print this page
rev 10535 : incremental inlining fixes


 814   GrowableArray <SafePointNode *> safepoints_done;
 815 
 816   ciKlass* klass = NULL;
 817   ciInstanceKlass* iklass = NULL;
 818   int nfields = 0;
 819   int array_base = 0;
 820   int element_size = 0;
 821   BasicType basic_elem_type = T_ILLEGAL;
 822   ciType* elem_type = NULL;
 823 
 824   Node* res = alloc->result_cast();
 825   assert(res == NULL || res->is_CheckCastPP(), "unexpected AllocateNode result");
 826   const TypeOopPtr* res_type = NULL;
 827   if (res != NULL) { // Could be NULL when there are no users
 828     res_type = _igvn.type(res)->isa_oopptr();
 829   }
 830 
 831   if (res != NULL) {
 832     klass = res_type->klass();
 833     // Value types are only allocated on demand
 834     assert(!klass->is_valuetype(), "value type allocations should not be scalar replaceable");
 835     if (res_type->isa_instptr()) {
 836       // find the fields of the class which will be needed for safepoint debug information
 837       assert(klass->is_instance_klass(), "must be an instance klass.");
 838       iklass = klass->as_instance_klass();
 839       nfields = iklass->nof_nonstatic_fields();
 840     } else {
 841       // find the array's elements which will be needed for safepoint debug information
 842       nfields = alloc->in(AllocateNode::ALength)->find_int_con(-1);
 843       assert(klass->is_array_klass() && nfields >= 0, "must be an array klass.");
 844       elem_type = klass->as_array_klass()->element_type();
 845       basic_elem_type = elem_type->basic_type();
 846       array_base = arrayOopDesc::base_offset_in_bytes(basic_elem_type);
 847       element_size = type2aelembytes(basic_elem_type);
 848     }
 849   }
 850   //
 851   // Process the safepoint uses
 852   //
 853   while (safepoints.length() > 0) {
 854     SafePointNode* sfpt = safepoints.pop();
 855     Node* mem = sfpt->memory();




 814   GrowableArray <SafePointNode *> safepoints_done;
 815 
 816   ciKlass* klass = NULL;
 817   ciInstanceKlass* iklass = NULL;
 818   int nfields = 0;
 819   int array_base = 0;
 820   int element_size = 0;
 821   BasicType basic_elem_type = T_ILLEGAL;
 822   ciType* elem_type = NULL;
 823 
 824   Node* res = alloc->result_cast();
 825   assert(res == NULL || res->is_CheckCastPP(), "unexpected AllocateNode result");
 826   const TypeOopPtr* res_type = NULL;
 827   if (res != NULL) { // Could be NULL when there are no users
 828     res_type = _igvn.type(res)->isa_oopptr();
 829   }
 830 
 831   if (res != NULL) {
 832     klass = res_type->klass();
 833     // Value types are only allocated on demand
 834     if (res_type->isa_instptr() || res_type->isa_valuetypeptr()) {

 835       // find the fields of the class which will be needed for safepoint debug information
 836       assert(klass->is_instance_klass(), "must be an instance klass.");
 837       iklass = klass->as_instance_klass();
 838       nfields = iklass->nof_nonstatic_fields();
 839     } else {
 840       // find the array's elements which will be needed for safepoint debug information
 841       nfields = alloc->in(AllocateNode::ALength)->find_int_con(-1);
 842       assert(klass->is_array_klass() && nfields >= 0, "must be an array klass.");
 843       elem_type = klass->as_array_klass()->element_type();
 844       basic_elem_type = elem_type->basic_type();
 845       array_base = arrayOopDesc::base_offset_in_bytes(basic_elem_type);
 846       element_size = type2aelembytes(basic_elem_type);
 847     }
 848   }
 849   //
 850   // Process the safepoint uses
 851   //
 852   while (safepoints.length() > 0) {
 853     SafePointNode* sfpt = safepoints.pop();
 854     Node* mem = sfpt->memory();


< prev index next >