src/share/vm/opto/compile.cpp

changeset 9512
992120803410
parent 9335
c96534cd81fe
child 9572
624a0741915c
child 9858
b985cbb00e68
     1.1 --- a/src/share/vm/opto/compile.cpp	Mon Oct 22 02:50:45 2018 -0400
     1.2 +++ b/src/share/vm/opto/compile.cpp	Mon Oct 22 05:26:38 2018 -0400
     1.3 @@ -1680,16 +1680,23 @@
     1.4    const TypePtr* flat = flatten_alias_type(adr_type);
     1.5  
     1.6  #ifdef ASSERT
     1.7 -  assert(flat == flatten_alias_type(flat), "idempotent");
     1.8 -  assert(flat != TypePtr::BOTTOM,     "cannot alias-analyze an untyped ptr");
     1.9 -  if (flat->isa_oopptr() && !flat->isa_klassptr()) {
    1.10 -    const TypeOopPtr* foop = flat->is_oopptr();
    1.11 -    // Scalarizable allocations have exact klass always.
    1.12 -    bool exact = !foop->klass_is_exact() || foop->is_known_instance();
    1.13 -    const TypePtr* xoop = foop->cast_to_exactness(exact)->is_ptr();
    1.14 -    assert(foop == flatten_alias_type(xoop), "exactness must not affect alias type");
    1.15 +  {
    1.16 +    ResourceMark rm;
    1.17 +    assert(flat == flatten_alias_type(flat),
    1.18 +           err_msg("not idempotent: adr_type = %s; flat = %s => %s", Type::str(adr_type),
    1.19 +                   Type::str(flat), Type::str(flatten_alias_type(flat))));
    1.20 +    assert(flat != TypePtr::BOTTOM,
    1.21 +           err_msg("cannot alias-analyze an untyped ptr: adr_type = %s", Type::str(adr_type)));
    1.22 +    if (flat->isa_oopptr() && !flat->isa_klassptr()) {
    1.23 +      const TypeOopPtr* foop = flat->is_oopptr();
    1.24 +      // Scalarizable allocations have exact klass always.
    1.25 +      bool exact = !foop->klass_is_exact() || foop->is_known_instance();
    1.26 +      const TypePtr* xoop = foop->cast_to_exactness(exact)->is_ptr();
    1.27 +      assert(foop == flatten_alias_type(xoop),
    1.28 +             err_msg("exactness must not affect alias type: foop = %s; xoop = %s",
    1.29 +                     Type::str(foop), Type::str(xoop)));
    1.30 +    }
    1.31    }
    1.32 -  assert(flat == flatten_alias_type(flat), "exact bit doesn't matter");
    1.33  #endif
    1.34  
    1.35    int idx = AliasIdxTop;

mercurial