src/share/vm/opto/escape.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File 8054033 Sdiff src/share/vm/opto

src/share/vm/opto/escape.cpp

Print this page




1435     // Non-escaped allocation returned from Java or runtime call have
1436     // unknown values in fields.
1437     for (EdgeIterator i(pta); i.has_next(); i.next()) {
1438       PointsToNode* field = i.get();
1439       if (field->is_Field() && field->as_Field()->is_oop()) {
1440         if (add_edge(field, phantom_obj)) {
1441           // New edge was added
1442           new_edges++;
1443           add_field_uses_to_worklist(field->as_Field());
1444         }
1445       }
1446     }
1447     return new_edges;
1448   }
1449   assert(init_val == null_obj, "sanity");
1450   // Do nothing for Call nodes since its fields values are unknown.
1451   if (!alloc->is_Allocate())
1452     return 0;
1453 
1454   InitializeNode* ini = alloc->as_Allocate()->initialization();
1455   Compile* C = _compile;
1456   bool visited_bottom_offset = false;
1457   GrowableArray<int> offsets_worklist;
1458 
1459   // Check if an oop field's initializing value is recorded and add
1460   // a corresponding NULL if field's value if it is not recorded.
1461   // Connection Graph does not record a default initialization by NULL
1462   // captured by Initialize node.
1463   //
1464   for (EdgeIterator i(pta); i.has_next(); i.next()) {
1465     PointsToNode* field = i.get(); // Field (AddP)
1466     if (!field->is_Field() || !field->as_Field()->is_oop())
1467       continue; // Not oop field
1468     int offset = field->as_Field()->offset();
1469     if (offset == Type::OffsetBot) {
1470       if (!visited_bottom_offset) {
1471         // OffsetBot is used to reference array's element,
1472         // always add reference to NULL to all Field nodes since we don't
1473         // known which element is referenced.
1474         if (add_edge(field, null_obj)) {
1475           // New edge was added




1435     // Non-escaped allocation returned from Java or runtime call have
1436     // unknown values in fields.
1437     for (EdgeIterator i(pta); i.has_next(); i.next()) {
1438       PointsToNode* field = i.get();
1439       if (field->is_Field() && field->as_Field()->is_oop()) {
1440         if (add_edge(field, phantom_obj)) {
1441           // New edge was added
1442           new_edges++;
1443           add_field_uses_to_worklist(field->as_Field());
1444         }
1445       }
1446     }
1447     return new_edges;
1448   }
1449   assert(init_val == null_obj, "sanity");
1450   // Do nothing for Call nodes since its fields values are unknown.
1451   if (!alloc->is_Allocate())
1452     return 0;
1453 
1454   InitializeNode* ini = alloc->as_Allocate()->initialization();

1455   bool visited_bottom_offset = false;
1456   GrowableArray<int> offsets_worklist;
1457 
1458   // Check if an oop field's initializing value is recorded and add
1459   // a corresponding NULL if field's value if it is not recorded.
1460   // Connection Graph does not record a default initialization by NULL
1461   // captured by Initialize node.
1462   //
1463   for (EdgeIterator i(pta); i.has_next(); i.next()) {
1464     PointsToNode* field = i.get(); // Field (AddP)
1465     if (!field->is_Field() || !field->as_Field()->is_oop())
1466       continue; // Not oop field
1467     int offset = field->as_Field()->offset();
1468     if (offset == Type::OffsetBot) {
1469       if (!visited_bottom_offset) {
1470         // OffsetBot is used to reference array's element,
1471         // always add reference to NULL to all Field nodes since we don't
1472         // known which element is referenced.
1473         if (add_edge(field, null_obj)) {
1474           // New edge was added


src/share/vm/opto/escape.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File