838 assert(type == half_type(type2), "must be 2nd half"); 839 } 840 } 841 } 842 843 // ------------------------------------------------------------------ 844 // ciTypeFlow::StateVector::do_ret 845 void ciTypeFlow::StateVector::do_ret(ciBytecodeStream* str) { 846 Cell index = local(str->get_index()); 847 848 ciType* address = type_at(index); 849 assert(address->is_return_address(), "bad return address"); 850 set_type_at(index, bottom_type()); 851 } 852 853 void ciTypeFlow::StateVector::do_vunbox(ciBytecodeStream* str) { 854 bool will_link; 855 ciKlass* klass = str->get_klass(will_link); 856 // TODO: Handle case when class is not loaded. 857 guarantee(will_link, "Class to which the value-capable class will unbox to must be loaded for JIT compilation"); 858 assert(klass->is_valuetype(), "must be value type"); 859 pop_object(); 860 push_object(klass->as_value_klass()); 861 } 862 863 void ciTypeFlow::StateVector::do_vbox(ciBytecodeStream* str) { 864 bool will_link; 865 ciKlass* klass = str->get_klass(will_link); 866 // TODO: Handle case when class is not loaded. 867 guarantee(will_link, "Class to which value type will box to must be loaded for JIT compilation"); 868 assert(klass->is_instance_klass(), "must be an instance class"); 869 pop_object(); 870 push_object(klass->as_instance_klass()); 871 } 872 873 // ------------------------------------------------------------------ 874 // ciTypeFlow::StateVector::trap 875 // 876 // Stop interpretation of this path with a trap. 877 void ciTypeFlow::StateVector::trap(ciBytecodeStream* str, ciKlass* klass, int index) { 878 _trap_bci = str->cur_bci(); 879 _trap_index = index; 880 | 838 assert(type == half_type(type2), "must be 2nd half"); 839 } 840 } 841 } 842 843 // ------------------------------------------------------------------ 844 // ciTypeFlow::StateVector::do_ret 845 void ciTypeFlow::StateVector::do_ret(ciBytecodeStream* str) { 846 Cell index = local(str->get_index()); 847 848 ciType* address = type_at(index); 849 assert(address->is_return_address(), "bad return address"); 850 set_type_at(index, bottom_type()); 851 } 852 853 void ciTypeFlow::StateVector::do_vunbox(ciBytecodeStream* str) { 854 bool will_link; 855 ciKlass* klass = str->get_klass(will_link); 856 // TODO: Handle case when class is not loaded. 857 guarantee(will_link, "Class to which the value-capable class will unbox to must be loaded for JIT compilation"); 858 assert(klass->is_instance_klass(), "must be an instance class"); 859 pop_object(); 860 push_object(klass->as_instance_klass()); 861 } 862 863 void ciTypeFlow::StateVector::do_vbox(ciBytecodeStream* str) { 864 bool will_link; 865 ciKlass* klass = str->get_klass(will_link); 866 // TODO: Handle case when class is not loaded. 867 guarantee(will_link, "Class to which value type will box to must be loaded for JIT compilation"); 868 assert(klass->is_instance_klass(), "must be an instance class"); 869 pop_object(); 870 push_object(klass->as_instance_klass()); 871 } 872 873 // ------------------------------------------------------------------ 874 // ciTypeFlow::StateVector::trap 875 // 876 // Stop interpretation of this path with a trap. 877 void ciTypeFlow::StateVector::trap(ciBytecodeStream* str, ciKlass* klass, int index) { 878 _trap_bci = str->cur_bci(); 879 _trap_index = index; 880 |