src/share/vm/opto/cfgnode.cpp

changeset 670
9c2ecc2ffb12
parent 631
d1605aabd0a1
parent 658
1dd146f17531
child 682
02a35ad4adf8
     1.1 --- a/src/share/vm/opto/cfgnode.cpp	Thu Jul 03 11:01:32 2008 -0700
     1.2 +++ b/src/share/vm/opto/cfgnode.cpp	Fri Jul 11 01:14:44 2008 -0700
     1.3 @@ -708,12 +708,12 @@
     1.4  // Split out an instance type from a bottom phi.
     1.5  PhiNode* PhiNode::split_out_instance(const TypePtr* at, PhaseIterGVN *igvn) const {
     1.6    const TypeOopPtr *t_oop = at->isa_oopptr();
     1.7 -  assert(t_oop != NULL && t_oop->is_instance(), "expecting instance oopptr");
     1.8 +  assert(t_oop != NULL && t_oop->is_known_instance(), "expecting instance oopptr");
     1.9    const TypePtr *t = adr_type();
    1.10    assert(type() == Type::MEMORY &&
    1.11           (t == TypePtr::BOTTOM || t == TypeRawPtr::BOTTOM ||
    1.12 -          t->isa_oopptr() && !t->is_oopptr()->is_instance() &&
    1.13 -          t->is_oopptr()->cast_to_instance(t_oop->instance_id()) == t_oop),
    1.14 +          t->isa_oopptr() && !t->is_oopptr()->is_known_instance() &&
    1.15 +          t->is_oopptr()->cast_to_instance_id(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 @@ -854,7 +854,8 @@
    1.20    // Until we have harmony between classes and interfaces in the type
    1.21    // lattice, we must tread carefully around phis which implicitly
    1.22    // convert the one to the other.
    1.23 -  const TypeInstPtr* ttip = _type->isa_narrowoop() ? _type->isa_narrowoop()->make_oopptr()->isa_instptr() :_type->isa_instptr();
    1.24 +  const TypePtr* ttp = _type->make_ptr();
    1.25 +  const TypeInstPtr* ttip = (ttp != NULL) ? ttp->isa_instptr() : NULL;
    1.26    bool is_intf = false;
    1.27    if (ttip != NULL) {
    1.28      ciKlass* k = ttip->klass();
    1.29 @@ -873,7 +874,8 @@
    1.30        // of all the input types.  The lattice is not distributive in
    1.31        // such cases.  Ward off asserts in type.cpp by refusing to do
    1.32        // meets between interfaces and proper classes.
    1.33 -      const TypeInstPtr* tiip = ti->isa_narrowoop() ? ti->is_narrowoop()->make_oopptr()->isa_instptr() : ti->isa_instptr();
    1.34 +      const TypePtr* tip = ti->make_ptr();
    1.35 +      const TypeInstPtr* tiip = (tip != NULL) ? tip->isa_instptr() : NULL;
    1.36        if (tiip) {
    1.37          bool ti_is_intf = false;
    1.38          ciKlass* k = tiip->klass();
    1.39 @@ -930,13 +932,14 @@
    1.40      // class-typed Phi and an interface flows in, it's possible that the meet &
    1.41      // join report an interface back out.  This isn't possible but happens
    1.42      // because the type system doesn't interact well with interfaces.
    1.43 -    const TypeInstPtr *jtip = jt->isa_narrowoop() ? jt->isa_narrowoop()->make_oopptr()->isa_instptr() : jt->isa_instptr();
    1.44 +    const TypePtr *jtp = jt->make_ptr();
    1.45 +    const TypeInstPtr *jtip = (jtp != NULL) ? jtp->isa_instptr() : NULL;
    1.46      if( jtip && ttip ) {
    1.47        if( jtip->is_loaded() &&  jtip->klass()->is_interface() &&
    1.48            ttip->is_loaded() && !ttip->klass()->is_interface() ) {
    1.49          // Happens in a CTW of rt.jar, 320-341, no extra flags
    1.50          assert(ft == ttip->cast_to_ptr_type(jtip->ptr()) ||
    1.51 -               ft->isa_narrowoop() && ft->isa_narrowoop()->make_oopptr() == ttip->cast_to_ptr_type(jtip->ptr()), "");
    1.52 +               ft->isa_narrowoop() && ft->make_ptr() == ttip->cast_to_ptr_type(jtip->ptr()), "");
    1.53          jt = ft;
    1.54        }
    1.55      }

mercurial