< prev index next >

src/hotspot/share/opto/parse3.cpp

Print this page




 216         ciObject* val = mirror->field_value(field).as_object();
 217         if (!val->is_null_object()) {
 218           type = type->join_speculative(TypePtr::NOTNULL);
 219         }
 220       }
 221     }
 222   } else {
 223     type = Type::get_const_basic_type(bt);
 224   }
 225 
 226   Node* ld = NULL;
 227   if (flattened) {
 228     // Load flattened value type
 229     ld = ValueTypeNode::make_from_flattened(this, field_klass->as_value_klass(), obj, obj, field->holder(), offset);
 230   } else {
 231     DecoratorSet decorators = IN_HEAP;
 232     decorators |= is_vol ? MO_SEQ_CST : MO_UNORDERED;
 233     ld = access_load_at(obj, adr, adr_type, type, bt, decorators);
 234     if (bt == T_VALUETYPE) {
 235       // Load a non-flattened value type from memory
 236       ld = ValueTypeNode::make_from_oop(this, ld, field_klass->as_value_klass(), /* buffer_check */ false, /* null2default */ flattenable, iter().next_bci());
 237     }
 238   }
 239 
 240   // Adjust Java stack
 241   if (type2size[bt] == 1)
 242     push(ld);
 243   else
 244     push_pair(ld);
 245 
 246   if (must_assert_null) {
 247     // Do not take a trap here.  It's possible that the program
 248     // will never load the field's class, and will happily see
 249     // null values in this field forever.  Don't stumble into a
 250     // trap for such a program, or we might get a long series
 251     // of useless recompilations.  (Or, we might load a class
 252     // which should not be loaded.)  If we ever see a non-null
 253     // value, we will then trap and recompile.  (The trap will
 254     // not need to mention the class index, since the class will
 255     // already have been loaded if we ever see a non-null value.)
 256     // uncommon_trap(iter().get_field_signature_index());




 216         ciObject* val = mirror->field_value(field).as_object();
 217         if (!val->is_null_object()) {
 218           type = type->join_speculative(TypePtr::NOTNULL);
 219         }
 220       }
 221     }
 222   } else {
 223     type = Type::get_const_basic_type(bt);
 224   }
 225 
 226   Node* ld = NULL;
 227   if (flattened) {
 228     // Load flattened value type
 229     ld = ValueTypeNode::make_from_flattened(this, field_klass->as_value_klass(), obj, obj, field->holder(), offset);
 230   } else {
 231     DecoratorSet decorators = IN_HEAP;
 232     decorators |= is_vol ? MO_SEQ_CST : MO_UNORDERED;
 233     ld = access_load_at(obj, adr, adr_type, type, bt, decorators);
 234     if (bt == T_VALUETYPE) {
 235       // Load a non-flattened value type from memory
 236       ld = ValueTypeNode::make_from_oop(this, ld, field_klass->as_value_klass(), /* null2default */ flattenable, iter().next_bci());
 237     }
 238   }
 239 
 240   // Adjust Java stack
 241   if (type2size[bt] == 1)
 242     push(ld);
 243   else
 244     push_pair(ld);
 245 
 246   if (must_assert_null) {
 247     // Do not take a trap here.  It's possible that the program
 248     // will never load the field's class, and will happily see
 249     // null values in this field forever.  Don't stumble into a
 250     // trap for such a program, or we might get a long series
 251     // of useless recompilations.  (Or, we might load a class
 252     // which should not be loaded.)  If we ever see a non-null
 253     // value, we will then trap and recompile.  (The trap will
 254     // not need to mention the class index, since the class will
 255     // already have been loaded if we ever see a non-null value.)
 256     // uncommon_trap(iter().get_field_signature_index());


< prev index next >