Mercurial > hg > graal-jvmci-8
comparison src/share/vm/opto/output.cpp @ 331:cecd8eb4e0ca
6706829: Compressed Oops: add debug info for narrow oops
Summary: Add support for narrow oops in debug info to avoid decoding.
Reviewed-by: rasbold, never
author | kvn |
---|---|
date | Wed, 10 Sep 2008 18:23:32 -0700 |
parents | 9c2ecc2ffb12 |
children | 4d9884b01ba6 |
comparison
equal
deleted
inserted
replaced
330:1c6e3bfb543a | 331:cecd8eb4e0ca |
---|---|
683 array->append(new_loc_value( _regalloc, regnum, Matcher::float_in_double | 683 array->append(new_loc_value( _regalloc, regnum, Matcher::float_in_double |
684 ? Location::float_in_dbl : Location::normal )); | 684 ? Location::float_in_dbl : Location::normal )); |
685 } else if( t->base() == Type::Int && OptoReg::is_reg(regnum) ) { | 685 } else if( t->base() == Type::Int && OptoReg::is_reg(regnum) ) { |
686 array->append(new_loc_value( _regalloc, regnum, Matcher::int_in_long | 686 array->append(new_loc_value( _regalloc, regnum, Matcher::int_in_long |
687 ? Location::int_in_long : Location::normal )); | 687 ? Location::int_in_long : Location::normal )); |
688 } else if( t->base() == Type::NarrowOop ) { | |
689 array->append(new_loc_value( _regalloc, regnum, Location::narrowoop )); | |
688 } else { | 690 } else { |
689 array->append(new_loc_value( _regalloc, regnum, _regalloc->is_oop(local) ? Location::oop : Location::normal )); | 691 array->append(new_loc_value( _regalloc, regnum, _regalloc->is_oop(local) ? Location::oop : Location::normal )); |
690 } | 692 } |
691 return; | 693 return; |
692 } | 694 } |
701 break; | 703 break; |
702 case Type::AryPtr: | 704 case Type::AryPtr: |
703 case Type::InstPtr: | 705 case Type::InstPtr: |
704 case Type::KlassPtr: // fall through | 706 case Type::KlassPtr: // fall through |
705 array->append(new ConstantOopWriteValue(t->isa_oopptr()->const_oop()->encoding())); | 707 array->append(new ConstantOopWriteValue(t->isa_oopptr()->const_oop()->encoding())); |
708 break; | |
709 case Type::NarrowOop: | |
710 if (t == TypeNarrowOop::NULL_PTR) { | |
711 array->append(new ConstantOopWriteValue(NULL)); | |
712 } else { | |
713 array->append(new ConstantOopWriteValue(t->make_ptr()->isa_oopptr()->const_oop()->encoding())); | |
714 } | |
706 break; | 715 break; |
707 case Type::Int: | 716 case Type::Int: |
708 array->append(new ConstantIntValue(t->is_int()->get_con())); | 717 array->append(new ConstantIntValue(t->is_int()->get_con())); |
709 break; | 718 break; |
710 case Type::RawPtr: | 719 case Type::RawPtr: |
876 } | 885 } |
877 scval = sv; | 886 scval = sv; |
878 } | 887 } |
879 } else if( !obj_node->is_Con() ) { | 888 } else if( !obj_node->is_Con() ) { |
880 OptoReg::Name obj_reg = _regalloc->get_reg_first(obj_node); | 889 OptoReg::Name obj_reg = _regalloc->get_reg_first(obj_node); |
881 scval = new_loc_value( _regalloc, obj_reg, Location::oop ); | 890 if( obj_node->bottom_type()->base() == Type::NarrowOop ) { |
891 scval = new_loc_value( _regalloc, obj_reg, Location::narrowoop ); | |
892 } else { | |
893 scval = new_loc_value( _regalloc, obj_reg, Location::oop ); | |
894 } | |
882 } else { | 895 } else { |
883 scval = new ConstantOopWriteValue(obj_node->bottom_type()->is_instptr()->const_oop()->encoding()); | 896 const TypePtr *tp = obj_node->bottom_type()->make_ptr(); |
897 scval = new ConstantOopWriteValue(tp->is_instptr()->const_oop()->encoding()); | |
884 } | 898 } |
885 | 899 |
886 OptoReg::Name box_reg = BoxLockNode::stack_slot(box_node); | 900 OptoReg::Name box_reg = BoxLockNode::stack_slot(box_node); |
887 Location basic_lock = Location::new_stk_loc(Location::normal,_regalloc->reg2offset(box_reg)); | 901 Location basic_lock = Location::new_stk_loc(Location::normal,_regalloc->reg2offset(box_reg)); |
888 monarray->append(new MonitorValue(scval, basic_lock, box_node->as_BoxLock()->is_eliminated())); | 902 monarray->append(new MonitorValue(scval, basic_lock, box_node->as_BoxLock()->is_eliminated())); |