< prev index next >

src/share/vm/ci/ciTypeFlow.cpp

Print this page




 774 // ------------------------------------------------------------------
 775 // ciTypeFlow::StateVector::do_vdefault
 776 void ciTypeFlow::StateVector::do_vdefault(ciBytecodeStream* str) {
 777   bool will_link;
 778   ciKlass* klass = str->get_klass(will_link);
 779   assert(klass->is_valuetype(), "should be value type");
 780   if (!will_link || str->is_unresolved_value_type()) {
 781     trap(str, klass, str->get_klass_index());
 782   } else {
 783     push_object(klass);
 784   }
 785 }
 786 
 787 // ------------------------------------------------------------------
 788 // ciTypeFlow::StateVector::do_vwithfield
 789 void ciTypeFlow::StateVector::do_vwithfield(ciBytecodeStream* str) {
 790   bool will_link;
 791   ciField* field = str->get_field(will_link);
 792   ciKlass* klass = field->holder();
 793   assert(klass->is_valuetype(), "should be value type");
 794   // TODO: add additional checks


 795   ciType* type = pop_value();
 796   ciType* field_type = field->type();

 797   if (field_type->is_two_word()) {
 798     ciType* type2 = pop_value();
 799     assert(type2->is_two_word(), "must be 2nd half");
 800     assert(type == half_type(type2), "must be 2nd half");
 801   }
 802   pop_object();
 803   push_object(klass);

 804 }
 805 
 806 // ------------------------------------------------------------------
 807 // ciTypeFlow::StateVector::do_newarray
 808 void ciTypeFlow::StateVector::do_newarray(ciBytecodeStream* str) {
 809   pop_int();
 810   ciKlass* klass = ciTypeArrayKlass::make((BasicType)str->get_index());
 811   push_object(klass);
 812 }
 813 
 814 // ------------------------------------------------------------------
 815 // ciTypeFlow::StateVector::do_putfield
 816 void ciTypeFlow::StateVector::do_putfield(ciBytecodeStream* str) {
 817   do_putstatic(str);
 818   if (_trap_bci != -1)  return;  // unloaded field holder, etc.
 819   // could add assert here for type of object.
 820   pop_object();
 821 }
 822 
 823 // ------------------------------------------------------------------




 774 // ------------------------------------------------------------------
 775 // ciTypeFlow::StateVector::do_vdefault
 776 void ciTypeFlow::StateVector::do_vdefault(ciBytecodeStream* str) {
 777   bool will_link;
 778   ciKlass* klass = str->get_klass(will_link);
 779   assert(klass->is_valuetype(), "should be value type");
 780   if (!will_link || str->is_unresolved_value_type()) {
 781     trap(str, klass, str->get_klass_index());
 782   } else {
 783     push_object(klass);
 784   }
 785 }
 786 
 787 // ------------------------------------------------------------------
 788 // ciTypeFlow::StateVector::do_vwithfield
 789 void ciTypeFlow::StateVector::do_vwithfield(ciBytecodeStream* str) {
 790   bool will_link;
 791   ciField* field = str->get_field(will_link);
 792   ciKlass* klass = field->holder();
 793   assert(klass->is_valuetype(), "should be value type");
 794   if (!will_link) {
 795     trap(str, klass, str->get_field_holder_index());
 796   } else {
 797     ciType* type = pop_value();
 798     ciType* field_type = field->type();
 799     assert(field_type->is_loaded(), "field type must be loaded");
 800     if (field_type->is_two_word()) {
 801       ciType* type2 = pop_value();
 802       assert(type2->is_two_word(), "must be 2nd half");
 803       assert(type == half_type(type2), "must be 2nd half");
 804     }
 805     pop_object();
 806     push_object(klass);
 807   }
 808 }
 809 
 810 // ------------------------------------------------------------------
 811 // ciTypeFlow::StateVector::do_newarray
 812 void ciTypeFlow::StateVector::do_newarray(ciBytecodeStream* str) {
 813   pop_int();
 814   ciKlass* klass = ciTypeArrayKlass::make((BasicType)str->get_index());
 815   push_object(klass);
 816 }
 817 
 818 // ------------------------------------------------------------------
 819 // ciTypeFlow::StateVector::do_putfield
 820 void ciTypeFlow::StateVector::do_putfield(ciBytecodeStream* str) {
 821   do_putstatic(str);
 822   if (_trap_bci != -1)  return;  // unloaded field holder, etc.
 823   // could add assert here for type of object.
 824   pop_object();
 825 }
 826 
 827 // ------------------------------------------------------------------


< prev index next >