src/share/vm/opto/cfgnode.cpp

changeset 598
885ed790ecf0
parent 562
e0bd2e08e3d0
child 619
65fe2bd88839
     1.1 --- a/src/share/vm/opto/cfgnode.cpp	Tue May 20 06:32:58 2008 -0700
     1.2 +++ b/src/share/vm/opto/cfgnode.cpp	Wed May 21 10:45:07 2008 -0700
     1.3 @@ -707,8 +707,14 @@
     1.4  //------------------------split_out_instance-----------------------------------
     1.5  // Split out an instance type from a bottom phi.
     1.6  PhiNode* PhiNode::split_out_instance(const TypePtr* at, PhaseIterGVN *igvn) const {
     1.7 -  assert(type() == Type::MEMORY && (adr_type() == TypePtr::BOTTOM ||
     1.8 -         adr_type() == TypeRawPtr::BOTTOM) , "bottom or raw memory required");
     1.9 +  const TypeOopPtr *t_oop = at->isa_oopptr();
    1.10 +  assert(t_oop != NULL && t_oop->is_instance(), "expecting instance oopptr");
    1.11 +  const TypePtr *t = adr_type();
    1.12 +  assert(type() == Type::MEMORY &&
    1.13 +         (t == TypePtr::BOTTOM || t == TypeRawPtr::BOTTOM ||
    1.14 +          t->isa_oopptr() && !t->is_oopptr()->is_instance() &&
    1.15 +          t->is_oopptr()->cast_to_instance(t_oop->instance_id()) == t_oop),
    1.16 +         "bottom or raw memory required");
    1.17  
    1.18    // Check if an appropriate node already exists.
    1.19    Node *region = in(0);
    1.20 @@ -1342,7 +1348,7 @@
    1.21      Node *n = phi->in(i);
    1.22      if( !n ) return NULL;
    1.23      if( phase->type(n) == Type::TOP ) return NULL;
    1.24 -    if( n->Opcode() == Op_ConP )
    1.25 +    if( n->Opcode() == Op_ConP || n->Opcode() == Op_ConN )
    1.26        break;
    1.27    }
    1.28    if( i >= phi->req() )         // Only split for constants

mercurial