src/share/vm/opto/phaseX.cpp

changeset 6313
de95063c0e34
parent 6198
55fb97c4c58d
child 6679
968a17f18337
child 6680
78bbf4d43a14
     1.1 --- a/src/share/vm/opto/phaseX.cpp	Tue Jan 14 17:46:48 2014 -0800
     1.2 +++ b/src/share/vm/opto/phaseX.cpp	Fri Jan 24 09:31:53 2014 +0100
     1.3 @@ -323,6 +323,23 @@
     1.4    }
     1.5  }
     1.6  
     1.7 +
     1.8 +void NodeHash::check_no_speculative_types() {
     1.9 +#ifdef ASSERT
    1.10 +  uint max = size();
    1.11 +  Node *sentinel_node = sentinel();
    1.12 +  for (uint i = 0; i < max; ++i) {
    1.13 +    Node *n = at(i);
    1.14 +    if(n != NULL && n != sentinel_node && n->is_Type()) {
    1.15 +      TypeNode* tn = n->as_Type();
    1.16 +      const Type* t = tn->type();
    1.17 +      const Type* t_no_spec = t->remove_speculative();
    1.18 +      assert(t == t_no_spec, "dead node in hash table or missed node during speculative cleanup");
    1.19 +    }
    1.20 +  }
    1.21 +#endif
    1.22 +}
    1.23 +
    1.24  #ifndef PRODUCT
    1.25  //------------------------------dump-------------------------------------------
    1.26  // Dump statistics for the hash table
    1.27 @@ -1392,11 +1409,11 @@
    1.28    assert(UseTypeSpeculation, "speculation is off");
    1.29    for (uint i = 0; i < _types.Size(); i++)  {
    1.30      const Type* t = _types.fast_lookup(i);
    1.31 -    if (t != NULL && t->isa_oopptr()) {
    1.32 -      const TypeOopPtr* to = t->is_oopptr();
    1.33 -      _types.map(i, to->remove_speculative());
    1.34 +    if (t != NULL) {
    1.35 +      _types.map(i, t->remove_speculative());
    1.36      }
    1.37    }
    1.38 +  _table.check_no_speculative_types();
    1.39  }
    1.40  
    1.41  //=============================================================================

mercurial