comparison src/share/vm/opto/phaseX.cpp @ 14383:5ec7dace41a6

8027422: assert(_gvn.type(obj)->higher_equal(tjp)) failed: cast_up is no longer needed Summary: type methods shouldn't always operate on speculative part Reviewed-by: kvn, twisti
author roland
date Fri, 24 Jan 2014 09:31:53 +0100
parents de6a9e811145
children 4ca6dc0799b6 968a17f18337 78bbf4d43a14
comparison
equal deleted inserted replaced
14272:757ec609d8d5 14383:5ec7dace41a6
319 if(n != NULL && n != sentinel_node && !useful.test(n->_idx)) { 319 if(n != NULL && n != sentinel_node && !useful.test(n->_idx)) {
320 debug_only(n->exit_hash_lock()); // Unlock the node when removed 320 debug_only(n->exit_hash_lock()); // Unlock the node when removed
321 _table[i] = sentinel_node; // Replace with placeholder 321 _table[i] = sentinel_node; // Replace with placeholder
322 } 322 }
323 } 323 }
324 }
325
326
327 void NodeHash::check_no_speculative_types() {
328 #ifdef ASSERT
329 uint max = size();
330 Node *sentinel_node = sentinel();
331 for (uint i = 0; i < max; ++i) {
332 Node *n = at(i);
333 if(n != NULL && n != sentinel_node && n->is_Type()) {
334 TypeNode* tn = n->as_Type();
335 const Type* t = tn->type();
336 const Type* t_no_spec = t->remove_speculative();
337 assert(t == t_no_spec, "dead node in hash table or missed node during speculative cleanup");
338 }
339 }
340 #endif
324 } 341 }
325 342
326 #ifndef PRODUCT 343 #ifndef PRODUCT
327 //------------------------------dump------------------------------------------- 344 //------------------------------dump-------------------------------------------
328 // Dump statistics for the hash table 345 // Dump statistics for the hash table
1390 */ 1407 */
1391 void PhaseIterGVN::remove_speculative_types() { 1408 void PhaseIterGVN::remove_speculative_types() {
1392 assert(UseTypeSpeculation, "speculation is off"); 1409 assert(UseTypeSpeculation, "speculation is off");
1393 for (uint i = 0; i < _types.Size(); i++) { 1410 for (uint i = 0; i < _types.Size(); i++) {
1394 const Type* t = _types.fast_lookup(i); 1411 const Type* t = _types.fast_lookup(i);
1395 if (t != NULL && t->isa_oopptr()) { 1412 if (t != NULL) {
1396 const TypeOopPtr* to = t->is_oopptr(); 1413 _types.map(i, t->remove_speculative());
1397 _types.map(i, to->remove_speculative()); 1414 }
1398 } 1415 }
1399 } 1416 _table.check_no_speculative_types();
1400 } 1417 }
1401 1418
1402 //============================================================================= 1419 //=============================================================================
1403 #ifndef PRODUCT 1420 #ifndef PRODUCT
1404 uint PhaseCCP::_total_invokes = 0; 1421 uint PhaseCCP::_total_invokes = 0;