src/share/vm/opto/cfgnode.cpp

changeset 548
ba764ed4b6f2
parent 509
2a9af0b9cb1c
child 561
72f4a668df19
     1.1 --- a/src/share/vm/opto/cfgnode.cpp	Fri Apr 11 09:56:35 2008 -0400
     1.2 +++ b/src/share/vm/opto/cfgnode.cpp	Sun Apr 13 17:43:42 2008 -0400
     1.3 @@ -848,7 +848,7 @@
     1.4    // Until we have harmony between classes and interfaces in the type
     1.5    // lattice, we must tread carefully around phis which implicitly
     1.6    // convert the one to the other.
     1.7 -  const TypeInstPtr* ttip = _type->isa_instptr();
     1.8 +  const TypeInstPtr* ttip = _type->isa_narrowoop() ? _type->isa_narrowoop()->make_oopptr()->isa_instptr() :_type->isa_instptr();
     1.9    bool is_intf = false;
    1.10    if (ttip != NULL) {
    1.11      ciKlass* k = ttip->klass();
    1.12 @@ -867,7 +867,7 @@
    1.13        // of all the input types.  The lattice is not distributive in
    1.14        // such cases.  Ward off asserts in type.cpp by refusing to do
    1.15        // meets between interfaces and proper classes.
    1.16 -      const TypeInstPtr* tiip = ti->isa_instptr();
    1.17 +      const TypeInstPtr* tiip = ti->isa_narrowoop() ? ti->is_narrowoop()->make_oopptr()->isa_instptr() : ti->isa_instptr();
    1.18        if (tiip) {
    1.19          bool ti_is_intf = false;
    1.20          ciKlass* k = tiip->klass();
    1.21 @@ -924,12 +924,15 @@
    1.22      // class-typed Phi and an interface flows in, it's possible that the meet &
    1.23      // join report an interface back out.  This isn't possible but happens
    1.24      // because the type system doesn't interact well with interfaces.
    1.25 -    const TypeInstPtr *jtip = jt->isa_instptr();
    1.26 +    const TypeInstPtr *jtip = jt->isa_narrowoop() ? jt->isa_narrowoop()->make_oopptr()->isa_instptr() : jt->isa_instptr();
    1.27      if( jtip && ttip ) {
    1.28        if( jtip->is_loaded() &&  jtip->klass()->is_interface() &&
    1.29 -          ttip->is_loaded() && !ttip->klass()->is_interface() )
    1.30 +          ttip->is_loaded() && !ttip->klass()->is_interface() ) {
    1.31          // Happens in a CTW of rt.jar, 320-341, no extra flags
    1.32 -        { assert(ft == ttip->cast_to_ptr_type(jtip->ptr()), ""); jt = ft; }
    1.33 +        assert(ft == ttip->cast_to_ptr_type(jtip->ptr()) ||
    1.34 +               ft->isa_narrowoop() && ft->isa_narrowoop()->make_oopptr() == ttip->cast_to_ptr_type(jtip->ptr()), "");
    1.35 +        jt = ft;
    1.36 +      }
    1.37      }
    1.38      if (jt != ft && jt->base() == ft->base()) {
    1.39        if (jt->isa_int() &&

mercurial