< prev index next >

src/hotspot/share/opto/graphKit.cpp

Print this page




1781     elembt = T_OBJECT; // To satisfy switch in LoadNode::make()
1782   }
1783   Node* ld = make_load(ctl, adr, elemtype, elembt, arytype, MemNode::unordered);
1784   return ld;
1785 }
1786 
1787 //-------------------------set_arguments_for_java_call-------------------------
1788 // Arguments (pre-popped from the stack) are taken from the JVMS.
1789 void GraphKit::set_arguments_for_java_call(CallJavaNode* call, bool incremental_inlining) {
1790   // Add the call arguments:
1791   const TypeTuple* domain = call->tf()->domain_sig();
1792   ExtendedSignature sig_cc = ExtendedSignature(call->method()->get_sig_cc(), SigEntryFilter());
1793   uint nargs = domain->cnt();
1794   for (uint i = TypeFunc::Parms, idx = TypeFunc::Parms; i < nargs; i++) {
1795     Node* arg = argument(i-TypeFunc::Parms);
1796     const Type* t = domain->field_at(i);
1797     if (call->method()->has_scalarized_args() && t->is_valuetypeptr() && !t->maybe_null()) {
1798       // We don't pass value type arguments by reference but instead
1799       // pass each field of the value type
1800       ValueTypeNode* vt = arg->isa_ValueType();
1801       if (vt == NULL) {
1802         // TODO why is that?? Shouldn't we always see a valuetype node here?
1803         vt = ValueTypeNode::make_from_oop(this, arg, t->value_klass());
1804       }
1805       vt->pass_fields(this, call, sig_cc, idx);
1806       // If a value type argument is passed as fields, attach the Method* to the call site
1807       // to be able to access the extended signature later via attached_method_before_pc().
1808       // For example, see CompiledMethod::preserve_callee_argument_oops().
1809       call->set_override_symbolic_info(true);
1810       continue;
1811     } else if (arg->is_ValueType()) {
1812       // Pass value type argument via oop to callee
1813       if (!incremental_inlining) {
1814         arg = arg->as_ValueType()->allocate(this)->get_oop();
1815       } else {
1816         arg = ValueTypePtrNode::make_from_value_type(this, arg->as_ValueType(), false);
1817       }
1818     }
1819     call->init_req(idx++, arg);
1820     // Skip reserved arguments
1821     BasicType bt = t->basic_type();
1822     while (SigEntry::next_is_reserved(sig_cc, bt, true)) {
1823       call->init_req(idx++, top());
1824       if (type2size[bt] == 2) {




1781     elembt = T_OBJECT; // To satisfy switch in LoadNode::make()
1782   }
1783   Node* ld = make_load(ctl, adr, elemtype, elembt, arytype, MemNode::unordered);
1784   return ld;
1785 }
1786 
1787 //-------------------------set_arguments_for_java_call-------------------------
1788 // Arguments (pre-popped from the stack) are taken from the JVMS.
1789 void GraphKit::set_arguments_for_java_call(CallJavaNode* call, bool incremental_inlining) {
1790   // Add the call arguments:
1791   const TypeTuple* domain = call->tf()->domain_sig();
1792   ExtendedSignature sig_cc = ExtendedSignature(call->method()->get_sig_cc(), SigEntryFilter());
1793   uint nargs = domain->cnt();
1794   for (uint i = TypeFunc::Parms, idx = TypeFunc::Parms; i < nargs; i++) {
1795     Node* arg = argument(i-TypeFunc::Parms);
1796     const Type* t = domain->field_at(i);
1797     if (call->method()->has_scalarized_args() && t->is_valuetypeptr() && !t->maybe_null()) {
1798       // We don't pass value type arguments by reference but instead
1799       // pass each field of the value type
1800       ValueTypeNode* vt = arg->isa_ValueType();




1801       vt->pass_fields(this, call, sig_cc, idx);
1802       // If a value type argument is passed as fields, attach the Method* to the call site
1803       // to be able to access the extended signature later via attached_method_before_pc().
1804       // For example, see CompiledMethod::preserve_callee_argument_oops().
1805       call->set_override_symbolic_info(true);
1806       continue;
1807     } else if (arg->is_ValueType()) {
1808       // Pass value type argument via oop to callee
1809       if (!incremental_inlining) {
1810         arg = arg->as_ValueType()->allocate(this)->get_oop();
1811       } else {
1812         arg = ValueTypePtrNode::make_from_value_type(this, arg->as_ValueType(), false);
1813       }
1814     }
1815     call->init_req(idx++, arg);
1816     // Skip reserved arguments
1817     BasicType bt = t->basic_type();
1818     while (SigEntry::next_is_reserved(sig_cc, bt, true)) {
1819       call->init_req(idx++, top());
1820       if (type2size[bt] == 2) {


< prev index next >