src/share/vm/ci/ciTypeFlow.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File valhalla-experimental Cdiff src/share/vm/ci/ciTypeFlow.cpp

src/share/vm/ci/ciTypeFlow.cpp

Print this page

        

*** 826,835 **** --- 826,855 ---- ciType* address = type_at(index); assert(address->is_return_address(), "bad return address"); 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 // // Stop interpretation of this path with a trap. void ciTypeFlow::StateVector::trap(ciBytecodeStream* str, ciKlass* klass, int index) {
*** 1476,1485 **** --- 1496,1515 ---- ciType* value2 = pop_value(); push(value1); push(value2); break; } + case Bytecodes::_vunbox: + { + do_vunbox(str); + break; + } + case Bytecodes::_vbox: + { + do_vbox(str); + break; + } case Bytecodes::_wide: default: { // The iterator should skip this. ShouldNotReachHere();
src/share/vm/ci/ciTypeFlow.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File