diff src/share/vm/opto/escape.cpp @ 235:9c2ecc2ffb12 jdk7-b31

Merge
author trims
date Fri, 11 Jul 2008 01:14:44 -0700
parents d1605aabd0a1 1dd146f17531
children 4a4c365f777d
line wrap: on
line diff
--- a/src/share/vm/opto/escape.cpp	Thu Jul 03 11:01:32 2008 -0700
+++ b/src/share/vm/opto/escape.cpp	Fri Jul 11 01:14:44 2008 -0700
@@ -483,7 +483,7 @@
 //
 void ConnectionGraph::split_AddP(Node *addp, Node *base,  PhaseGVN  *igvn) {
   const TypeOopPtr *base_t = igvn->type(base)->isa_oopptr();
-  assert(base_t != NULL && base_t->is_instance(), "expecting instance oopptr");
+  assert(base_t != NULL && base_t->is_known_instance(), "expecting instance oopptr");
   const TypeOopPtr *t = igvn->type(addp)->isa_oopptr();
   if (t == NULL) {
     // We are computing a raw address for a store captured by an Initialize
@@ -494,8 +494,8 @@
     assert(offs != Type::OffsetBot, "offset must be a constant");
     t = base_t->add_offset(offs)->is_oopptr();
   }
-  uint inst_id =  base_t->instance_id();
-  assert(!t->is_instance() || t->instance_id() == inst_id,
+  int inst_id =  base_t->instance_id();
+  assert(!t->is_known_instance() || t->instance_id() == inst_id,
                              "old type must be non-instance or match new type");
   const TypeOopPtr *tinst = base_t->add_offset(t->offset())->is_oopptr();
   // Do NOT remove the next call: ensure an new alias index is allocated
@@ -509,7 +509,7 @@
   Node *adr = addp->in(AddPNode::Address);
   const TypeOopPtr  *atype = igvn->type(adr)->isa_oopptr();
   if (atype != NULL && atype->instance_id() != inst_id) {
-    assert(!atype->is_instance(), "no conflicting instances");
+    assert(!atype->is_known_instance(), "no conflicting instances");
     const TypeOopPtr *new_atype = base_t->add_offset(atype->offset())->isa_oopptr();
     Node *acast = new (_compile, 2) CastPPNode(adr, new_atype);
     acast->set_req(0, adr->in(0));
@@ -663,7 +663,7 @@
     return orig_mem;
   Compile* C = phase->C;
   const TypeOopPtr *tinst = C->get_adr_type(alias_idx)->isa_oopptr();
-  bool is_instance = (tinst != NULL) && tinst->is_instance();
+  bool is_instance = (tinst != NULL) && tinst->is_known_instance();
   Node *prev = NULL;
   Node *result = orig_mem;
   while (prev != result) {
@@ -693,7 +693,7 @@
         AllocateNode* alloc = proj_in->as_Initialize()->allocation();
         // Stop if this is the initialization for the object instance which
         // which contains this memory slice, otherwise skip over it.
-        if (alloc == NULL || alloc->_idx != tinst->instance_id()) {
+        if (alloc == NULL || alloc->_idx != (uint)tinst->instance_id()) {
           result = proj_in->in(TypeFunc::Memory);
         }
       } else if (proj_in->is_MemBar()) {
@@ -887,7 +887,7 @@
       const TypeOopPtr *t = igvn->type(n)->isa_oopptr();
       if (t == NULL)
         continue;  // not a TypeInstPtr
-      tinst = t->cast_to_instance(ni);
+      tinst = t->cast_to_instance_id(ni);
       igvn->hash_delete(n);
       igvn->set_type(n,  tinst);
       n->raise_bottom_type(tinst);
@@ -959,19 +959,19 @@
         Node *val = get_map(elem);   // CheckCastPP node
         TypeNode *tn = n->as_Type();
         tinst = igvn->type(val)->isa_oopptr();
-        assert(tinst != NULL && tinst->is_instance() &&
-               tinst->instance_id() == elem , "instance type expected.");
+        assert(tinst != NULL && tinst->is_known_instance() &&
+               (uint)tinst->instance_id() == elem , "instance type expected.");
 
-        const TypeOopPtr *tn_t = NULL;
         const Type *tn_type = igvn->type(tn);
+        const TypeOopPtr *tn_t;
         if (tn_type->isa_narrowoop()) {
-          tn_t = tn_type->is_narrowoop()->make_oopptr()->isa_oopptr();
+          tn_t = tn_type->make_ptr()->isa_oopptr();
         } else {
           tn_t = tn_type->isa_oopptr();
         }
 
         if (tn_t != NULL &&
- tinst->cast_to_instance(TypeOopPtr::UNKNOWN_INSTANCE)->higher_equal(tn_t)) {
+            tinst->cast_to_instance_id(TypeOopPtr::InstanceBot)->higher_equal(tn_t)) {
           if (tn_type->isa_narrowoop()) {
             tn_type = tinst->make_narrowoop();
           } else {
@@ -1921,9 +1921,7 @@
     case Op_StoreN:
     {
       const Type *adr_type = phase->type(n->in(MemNode::Address));
-      if (adr_type->isa_narrowoop()) {
-        adr_type = adr_type->is_narrowoop()->make_oopptr();
-      }
+      adr_type = adr_type->make_ptr();
       if (adr_type->isa_oopptr()) {
         add_node(n, PointsToNode::UnknownType, PointsToNode::UnknownEscape, false);
       } else {
@@ -1948,9 +1946,7 @@
     case Op_CompareAndSwapN:
     {
       const Type *adr_type = phase->type(n->in(MemNode::Address));
-      if (adr_type->isa_narrowoop()) {
-        adr_type = adr_type->is_narrowoop()->make_oopptr();
-      }
+      adr_type = adr_type->make_ptr();
       if (adr_type->isa_oopptr()) {
         add_node(n, PointsToNode::UnknownType, PointsToNode::UnknownEscape, false);
       } else {
@@ -2131,10 +2127,7 @@
     case Op_CompareAndSwapN:
     {
       Node *adr = n->in(MemNode::Address);
-      const Type *adr_type = phase->type(adr);
-      if (adr_type->isa_narrowoop()) {
-        adr_type = adr_type->is_narrowoop()->make_oopptr();
-      }
+      const Type *adr_type = phase->type(adr)->make_ptr();
 #ifdef ASSERT
       if (!adr_type->isa_oopptr())
         assert(phase->type(adr) == TypeRawPtr::NOTNULL, "Op_StoreP");