< prev index next >

src/hotspot/share/opto/graphKit.hpp

Print this page

        

*** 35,44 **** --- 35,45 ---- #include "opto/divnode.hpp" #include "opto/mulnode.hpp" #include "opto/phaseX.hpp" #include "opto/subnode.hpp" #include "opto/type.hpp" + #include "opto/valuetypenode.hpp" #include "runtime/deoptimization.hpp" class BarrierSetC2; class FastLockNode; class FastUnlockNode;
*** 676,686 **** //---------- help for generating calls -------------- // Do a null check on the receiver as it would happen before the call to // callee (with all arguments still on the stack). ! Node* null_check_receiver_before_call(ciMethod* callee) { assert(!callee->is_static(), "must be a virtual method"); if (argument(0)->is_ValueType()) { return argument(0); } // Callsite signature can be different from actual method being called (i.e _linkTo* sites). --- 677,687 ---- //---------- help for generating calls -------------- // Do a null check on the receiver as it would happen before the call to // callee (with all arguments still on the stack). ! Node* null_check_receiver_before_call(ciMethod* callee, bool replace_value = true) { assert(!callee->is_static(), "must be a virtual method"); if (argument(0)->is_ValueType()) { return argument(0); } // Callsite signature can be different from actual method being called (i.e _linkTo* sites).
*** 688,697 **** --- 689,708 ---- ciMethod* declared_method = method()->get_method_at_bci(bci()); const int nargs = declared_method->arg_size(); inc_sp(nargs); Node* n = null_check_receiver(); dec_sp(nargs); + // Scalarize value type receiver + const Type* recv_type = gvn().type(n); + if (recv_type->is_valuetypeptr() && recv_type->value_klass()->is_scalarizable()) { + assert(!recv_type->maybe_null(), "should never be null"); + ValueTypeNode* vt = ValueTypeNode::make_from_oop(this, n, recv_type->value_klass()); + if (replace_value) { + replace_in_map(n, vt); + } + n = vt; + } return n; } // Fill in argument edges for the call from argument(0), argument(1), ... // (The next step is to call set_edges_for_java_call.)
< prev index next >