Mercurial > hg > graal-jvmci-8
comparison src/share/vm/opto/doCall.cpp @ 20552:331df100ad40
8059299: assert(adr_type != NULL) failed: expecting TypeKlassPtr
Summary: Use top() for dead paths when initializing Phi node of exceptions klasses in Parse::catch_inline_exceptions().
Reviewed-by: jrose, vlivanov
author | kvn |
---|---|
date | Thu, 02 Oct 2014 11:36:44 -0700 |
parents | 411e30e5fbb8 |
children | e7b3d177adda |
comparison
equal
deleted
inserted
replaced
20551:73b3a2d4d4ef | 20552:331df100ad40 |
---|---|
797 // Obvious solution is to simple do a LoadKlass from the 'ex_node'. | 797 // Obvious solution is to simple do a LoadKlass from the 'ex_node'. |
798 // However, if the ex_node is a PhiNode, I'm going to do a LoadKlass for | 798 // However, if the ex_node is a PhiNode, I'm going to do a LoadKlass for |
799 // each arm of the Phi. If I know something clever about the exceptions | 799 // each arm of the Phi. If I know something clever about the exceptions |
800 // I'm loading the class from, I can replace the LoadKlass with the | 800 // I'm loading the class from, I can replace the LoadKlass with the |
801 // klass constant for the exception oop. | 801 // klass constant for the exception oop. |
802 if( ex_node->is_Phi() ) { | 802 if (ex_node->is_Phi()) { |
803 ex_klass_node = new (C) PhiNode( ex_node->in(0), TypeKlassPtr::OBJECT ); | 803 ex_klass_node = new (C) PhiNode(ex_node->in(0), TypeKlassPtr::OBJECT); |
804 for( uint i = 1; i < ex_node->req(); i++ ) { | 804 for (uint i = 1; i < ex_node->req(); i++) { |
805 Node* p = basic_plus_adr( ex_node->in(i), ex_node->in(i), oopDesc::klass_offset_in_bytes() ); | 805 Node* ex_in = ex_node->in(i); |
806 if (ex_in == top() || ex_in == NULL) { | |
807 // This path was not taken. | |
808 ex_klass_node->init_req(i, top()); | |
809 continue; | |
810 } | |
811 Node* p = basic_plus_adr(ex_in, ex_in, oopDesc::klass_offset_in_bytes()); | |
806 Node* k = _gvn.transform( LoadKlassNode::make(_gvn, immutable_memory(), p, TypeInstPtr::KLASS, TypeKlassPtr::OBJECT) ); | 812 Node* k = _gvn.transform( LoadKlassNode::make(_gvn, immutable_memory(), p, TypeInstPtr::KLASS, TypeKlassPtr::OBJECT) ); |
807 ex_klass_node->init_req( i, k ); | 813 ex_klass_node->init_req( i, k ); |
808 } | 814 } |
809 _gvn.set_type(ex_klass_node, TypeKlassPtr::OBJECT); | 815 _gvn.set_type(ex_klass_node, TypeKlassPtr::OBJECT); |
810 | 816 |