--- old/src/share/vm/ci/ciTypeFlow.cpp 2016-12-20 14:34:23.795342913 +0100 +++ new/src/share/vm/ci/ciTypeFlow.cpp 2016-12-20 14:34:23.083342946 +0100 @@ -828,6 +828,26 @@ set_type_at(index, bottom_type()); } +void ciTypeFlow::StateVector::do_vunbox(ciBytecodeStream* str) { + bool will_link; + ciKlass* klass = str->get_klass(will_link); + // TODO: Handle case when class is not loaded. + guarantee(will_link, "Class to which the value-capable class will unbox to must be loaded for JIT compilation"); + assert(klass->is_valuetype(), "must be value type"); + pop_object(); + push_object(klass->as_value_klass()); +} + +void ciTypeFlow::StateVector::do_vbox(ciBytecodeStream* str) { + bool will_link; + ciKlass* klass = str->get_klass(will_link); + // TODO: Handle case when class is not loaded. + guarantee(will_link, "Class to which value type will box to must be loaded for JIT compilation"); + assert(klass->is_instance_klass(), "must be an instance class"); + pop_object(); + push_object(klass->as_instance_klass()); +} + // ------------------------------------------------------------------ // ciTypeFlow::StateVector::trap // @@ -1478,6 +1498,16 @@ push(value2); break; } + case Bytecodes::_vunbox: + { + do_vunbox(str); + break; + } + case Bytecodes::_vbox: + { + do_vbox(str); + break; + } case Bytecodes::_wide: default: {