comparison src/share/vm/c1/c1_Canonicalizer.cpp @ 6133:c8289830e172

7172843: C1: fix "assert(has_printable_bci()) failed: _printable_bci should have been set" Reviewed-by: twisti Contributed-by: Krystal Mok <sajia@taobao.com>
author twisti
date Wed, 30 May 2012 12:17:07 -0700
parents 701a83c86f28
children 8f37087fc13f
comparison
equal deleted inserted replaced
6132:4d8787136e08 6133:c8289830e172
40 assert(x != NULL, "value must exist"); 40 assert(x != NULL, "value must exist");
41 // Note: we can not currently substitute root nodes which show up in 41 // Note: we can not currently substitute root nodes which show up in
42 // the instruction stream (because the instruction list is embedded 42 // the instruction stream (because the instruction list is embedded
43 // in the instructions). 43 // in the instructions).
44 if (canonical() != x) { 44 if (canonical() != x) {
45 #ifndef PRODUCT
46 if (!x->has_printable_bci()) {
47 x->set_printable_bci(bci());
48 }
49 #endif
45 if (PrintCanonicalization) { 50 if (PrintCanonicalization) {
46 PrintValueVisitor do_print_value; 51 PrintValueVisitor do_print_value;
47 canonical()->input_values_do(&do_print_value); 52 canonical()->input_values_do(&do_print_value);
48 canonical()->print_line(); 53 canonical()->print_line();
49 tty->print_cr("canonicalized to:"); 54 tty->print_cr("canonicalized to:");
675 case Bytecodes::_dcmpl: case Bytecodes::_dcmpg: 680 case Bytecodes::_dcmpl: case Bytecodes::_dcmpg:
676 set_canonical(x); 681 set_canonical(x);
677 return; 682 return;
678 } 683 }
679 } 684 }
685 set_bci(cmp->state_before()->bci());
680 set_canonical(canon); 686 set_canonical(canon);
681 set_bci(cmp->state_before()->bci());
682 } 687 }
683 } 688 }
684 } else if (l->as_InstanceOf() != NULL) { 689 } else if (l->as_InstanceOf() != NULL) {
685 // NOTE: Code permanently disabled for now since it leaves the old InstanceOf 690 // NOTE: Code permanently disabled for now since it leaves the old InstanceOf
686 // instruction in the graph (it is pinned). Need to fix this at some point. 691 // instruction in the graph (it is pinned). Need to fix this at some point.