Mercurial > hg > truffle
comparison src/share/vm/opto/output.cpp @ 989:148e5441d916
6863023: need non-perm oops in code cache for JSR 292
Summary: Make a special root-list for those few nmethods which might contain non-perm oops.
Reviewed-by: twisti, kvn, never, jmasa, ysr
author | jrose |
---|---|
date | Tue, 15 Sep 2009 21:53:47 -0700 |
parents | 15bbd3f505c0 |
children | e66fd840cb6b |
comparison
equal
deleted
inserted
replaced
987:00977607da34 | 989:148e5441d916 |
---|---|
609 if (sv == NULL) { | 609 if (sv == NULL) { |
610 ciKlass* cik = t->is_oopptr()->klass(); | 610 ciKlass* cik = t->is_oopptr()->klass(); |
611 assert(cik->is_instance_klass() || | 611 assert(cik->is_instance_klass() || |
612 cik->is_array_klass(), "Not supported allocation."); | 612 cik->is_array_klass(), "Not supported allocation."); |
613 sv = new ObjectValue(spobj->_idx, | 613 sv = new ObjectValue(spobj->_idx, |
614 new ConstantOopWriteValue(cik->encoding())); | 614 new ConstantOopWriteValue(cik->constant_encoding())); |
615 Compile::set_sv_for_object_node(objs, sv); | 615 Compile::set_sv_for_object_node(objs, sv); |
616 | 616 |
617 uint first_ind = spobj->first_index(); | 617 uint first_ind = spobj->first_index(); |
618 for (uint i = 0; i < spobj->n_fields(); i++) { | 618 for (uint i = 0; i < spobj->n_fields(); i++) { |
619 Node* fld_node = sfpt->in(first_ind+i); | 619 Node* fld_node = sfpt->in(first_ind+i); |
700 array->append(new ConstantOopWriteValue(NULL)); | 700 array->append(new ConstantOopWriteValue(NULL)); |
701 break; | 701 break; |
702 case Type::AryPtr: | 702 case Type::AryPtr: |
703 case Type::InstPtr: | 703 case Type::InstPtr: |
704 case Type::KlassPtr: // fall through | 704 case Type::KlassPtr: // fall through |
705 array->append(new ConstantOopWriteValue(t->isa_oopptr()->const_oop()->encoding())); | 705 array->append(new ConstantOopWriteValue(t->isa_oopptr()->const_oop()->constant_encoding())); |
706 break; | 706 break; |
707 case Type::NarrowOop: | 707 case Type::NarrowOop: |
708 if (t == TypeNarrowOop::NULL_PTR) { | 708 if (t == TypeNarrowOop::NULL_PTR) { |
709 array->append(new ConstantOopWriteValue(NULL)); | 709 array->append(new ConstantOopWriteValue(NULL)); |
710 } else { | 710 } else { |
711 array->append(new ConstantOopWriteValue(t->make_ptr()->isa_oopptr()->const_oop()->encoding())); | 711 array->append(new ConstantOopWriteValue(t->make_ptr()->isa_oopptr()->const_oop()->constant_encoding())); |
712 } | 712 } |
713 break; | 713 break; |
714 case Type::Int: | 714 case Type::Int: |
715 array->append(new ConstantIntValue(t->is_int()->get_con())); | 715 array->append(new ConstantIntValue(t->is_int()->get_con())); |
716 break; | 716 break; |
869 const Type *t = obj_node->bottom_type(); | 869 const Type *t = obj_node->bottom_type(); |
870 ciKlass* cik = t->is_oopptr()->klass(); | 870 ciKlass* cik = t->is_oopptr()->klass(); |
871 assert(cik->is_instance_klass() || | 871 assert(cik->is_instance_klass() || |
872 cik->is_array_klass(), "Not supported allocation."); | 872 cik->is_array_klass(), "Not supported allocation."); |
873 ObjectValue* sv = new ObjectValue(spobj->_idx, | 873 ObjectValue* sv = new ObjectValue(spobj->_idx, |
874 new ConstantOopWriteValue(cik->encoding())); | 874 new ConstantOopWriteValue(cik->constant_encoding())); |
875 Compile::set_sv_for_object_node(objs, sv); | 875 Compile::set_sv_for_object_node(objs, sv); |
876 | 876 |
877 uint first_ind = spobj->first_index(); | 877 uint first_ind = spobj->first_index(); |
878 for (uint i = 0; i < spobj->n_fields(); i++) { | 878 for (uint i = 0; i < spobj->n_fields(); i++) { |
879 Node* fld_node = sfn->in(first_ind+i); | 879 Node* fld_node = sfn->in(first_ind+i); |
888 } else { | 888 } else { |
889 scval = new_loc_value( _regalloc, obj_reg, Location::oop ); | 889 scval = new_loc_value( _regalloc, obj_reg, Location::oop ); |
890 } | 890 } |
891 } else { | 891 } else { |
892 const TypePtr *tp = obj_node->bottom_type()->make_ptr(); | 892 const TypePtr *tp = obj_node->bottom_type()->make_ptr(); |
893 scval = new ConstantOopWriteValue(tp->is_instptr()->const_oop()->encoding()); | 893 scval = new ConstantOopWriteValue(tp->is_instptr()->const_oop()->constant_encoding()); |
894 } | 894 } |
895 | 895 |
896 OptoReg::Name box_reg = BoxLockNode::stack_slot(box_node); | 896 OptoReg::Name box_reg = BoxLockNode::stack_slot(box_node); |
897 Location basic_lock = Location::new_stk_loc(Location::normal,_regalloc->reg2offset(box_reg)); | 897 Location basic_lock = Location::new_stk_loc(Location::normal,_regalloc->reg2offset(box_reg)); |
898 while( !box_node->is_BoxLock() ) box_node = box_node->in(1); | 898 while( !box_node->is_BoxLock() ) box_node = box_node->in(1); |