< prev index next >

src/share/vm/opto/macro.cpp

Print this page




 834     // of regular debuginfo at the last (youngest) JVMS.
 835     // Record relative start index.
 836     uint first_ind = (sfpt->req() - sfpt->jvms()->scloff());
 837     SafePointScalarObjectNode* sobj = new SafePointScalarObjectNode(res_type,
 838 #ifdef ASSERT
 839                                                  alloc,
 840 #endif
 841                                                  first_ind, nfields);
 842     sobj->init_req(0, C->root());
 843     transform_later(sobj);
 844 
 845     // Scan object's fields adding an input to the safepoint for each field.
 846     for (int j = 0; j < nfields; j++) {
 847       intptr_t offset;
 848       ciField* field = NULL;
 849       if (iklass != NULL) {
 850         field = iklass->nonstatic_field_at(j);
 851         offset = field->offset();
 852         elem_type = field->type();
 853         basic_elem_type = field->layout_type();

 854       } else {
 855         offset = array_base + j * (intptr_t)element_size;
 856       }
 857 
 858       const Type *field_type;
 859       // The next code is taken from Parse::do_get_xxx().
 860       if (basic_elem_type == T_OBJECT || basic_elem_type == T_ARRAY) {
 861         if (!elem_type->is_loaded()) {
 862           field_type = TypeInstPtr::BOTTOM;
 863         } else if (field != NULL && field->is_constant() && field->is_static()) {
 864           // This can happen if the constant oop is non-perm.
 865           ciObject* con = field->constant_value().as_object();
 866           // Do not "join" in the previous type; it doesn't add value,
 867           // and may yield a vacuous result if the field is of interface type.
 868           field_type = TypeOopPtr::make_from_constant(con)->isa_oopptr();
 869           assert(field_type != NULL, "field singleton type must be consistent");
 870         } else {
 871           field_type = TypeOopPtr::make_from_klass(elem_type->as_klass());
 872         }
 873         if (UseCompressedOops) {




 834     // of regular debuginfo at the last (youngest) JVMS.
 835     // Record relative start index.
 836     uint first_ind = (sfpt->req() - sfpt->jvms()->scloff());
 837     SafePointScalarObjectNode* sobj = new SafePointScalarObjectNode(res_type,
 838 #ifdef ASSERT
 839                                                  alloc,
 840 #endif
 841                                                  first_ind, nfields);
 842     sobj->init_req(0, C->root());
 843     transform_later(sobj);
 844 
 845     // Scan object's fields adding an input to the safepoint for each field.
 846     for (int j = 0; j < nfields; j++) {
 847       intptr_t offset;
 848       ciField* field = NULL;
 849       if (iklass != NULL) {
 850         field = iklass->nonstatic_field_at(j);
 851         offset = field->offset();
 852         elem_type = field->type();
 853         basic_elem_type = field->layout_type();
 854         assert(basic_elem_type != T_VALUETYPE, "value type fields are flattened");
 855       } else {
 856         offset = array_base + j * (intptr_t)element_size;
 857       }
 858 
 859       const Type *field_type;
 860       // The next code is taken from Parse::do_get_xxx().
 861       if (basic_elem_type == T_OBJECT || basic_elem_type == T_ARRAY) {
 862         if (!elem_type->is_loaded()) {
 863           field_type = TypeInstPtr::BOTTOM;
 864         } else if (field != NULL && field->is_constant() && field->is_static()) {
 865           // This can happen if the constant oop is non-perm.
 866           ciObject* con = field->constant_value().as_object();
 867           // Do not "join" in the previous type; it doesn't add value,
 868           // and may yield a vacuous result if the field is of interface type.
 869           field_type = TypeOopPtr::make_from_constant(con)->isa_oopptr();
 870           assert(field_type != NULL, "field singleton type must be consistent");
 871         } else {
 872           field_type = TypeOopPtr::make_from_klass(elem_type->as_klass());
 873         }
 874         if (UseCompressedOops) {


< prev index next >