< prev index next >

src/hotspot/share/opto/parse3.cpp

Print this page

        

@@ -132,11 +132,11 @@
     assert(_gvn.type(obj)->higher_equal(tjp), "cast_up is no longer needed");
 #endif
 
     if (is_get) {
       (void) pop();  // pop receiver before getting
-      do_get_xxx(obj, field, is_field);
+      do_get_xxx(obj, field);
     } else {
       do_put_xxx(obj, field, is_field);
       if (stopped()) {
         return;
       }

@@ -144,18 +144,18 @@
     }
   } else {
     const TypeInstPtr* tip = TypeInstPtr::make(field_holder->java_mirror());
     obj = _gvn.makecon(tip);
     if (is_get) {
-      do_get_xxx(obj, field, is_field);
+      do_get_xxx(obj, field);
     } else {
       do_put_xxx(obj, field, is_field);
     }
   }
 }
 
-void Parse::do_get_xxx(Node* obj, ciField* field, bool is_field) {
+void Parse::do_get_xxx(Node* obj, ciField* field) {
   BasicType bt = field->layout_type();
 
   // Does this field have a constant value?  If so, just push the value.
   if (field->is_constant() &&
       // Keep consistent with types found by ciTypeFlow: for an

@@ -209,10 +209,11 @@
         assert(!flattened, "static fields should not be flattened");
         ciInstance* mirror = field->holder()->java_mirror();
         ciObject* val = mirror->field_value(field).as_object();
         if (!val->is_null_object()) {
           type = type->join_speculative(TypePtr::NOTNULL);
+          flattenable = true; // Null-free, treat as flattenable
         }
       }
     }
   } else {
     type = Type::get_const_basic_type(bt);
< prev index next >