< prev index next >

src/share/vm/opto/graphKit.cpp

Print this page




1720 //-------------------------set_arguments_for_java_call-------------------------
1721 // Arguments (pre-popped from the stack) are taken from the JVMS.
1722 void GraphKit::set_arguments_for_java_call(CallJavaNode* call) {
1723   // Add the call arguments:
1724   const TypeTuple* domain = call->tf()->domain_sig();
1725   uint nargs = domain->cnt();
1726   for (uint i = TypeFunc::Parms, idx = TypeFunc::Parms; i < nargs; i++) {
1727     Node* arg = argument(i-TypeFunc::Parms);
1728     if (ValueTypePassFieldsAsArgs) {
1729       if (arg->is_ValueType()) {
1730         ValueTypeNode* vt = arg->as_ValueType();
1731         if (domain->field_at(i)->is_valuetypeptr()->klass() != C->env()->___Value_klass()) {
1732           // We don't pass value type arguments by reference but instead
1733           // pass each field of the value type
1734           idx += vt->set_arguments_for_java_call(call, idx, *this);
1735         } else {
1736           arg = arg->as_ValueType()->store_to_memory(this);
1737           call->init_req(idx, arg);
1738           idx++;
1739         }




1740       } else {
1741         call->init_req(idx, arg);
1742         idx++;
1743       }
1744     } else {
1745       if (arg->is_ValueType()) {
1746         // Pass value type argument via oop to callee
1747         arg = arg->as_ValueType()->store_to_memory(this);
1748       }
1749       call->init_req(i, arg);
1750     }
1751   }
1752 }
1753 
1754 //---------------------------set_edges_for_java_call---------------------------
1755 // Connect a newly created call into the current JVMS.
1756 // A return value node (if any) is returned from set_edges_for_java_call.
1757 void GraphKit::set_edges_for_java_call(CallJavaNode* call, bool must_throw, bool separate_io_proj) {
1758 
1759   // Add the predefined inputs:




1720 //-------------------------set_arguments_for_java_call-------------------------
1721 // Arguments (pre-popped from the stack) are taken from the JVMS.
1722 void GraphKit::set_arguments_for_java_call(CallJavaNode* call) {
1723   // Add the call arguments:
1724   const TypeTuple* domain = call->tf()->domain_sig();
1725   uint nargs = domain->cnt();
1726   for (uint i = TypeFunc::Parms, idx = TypeFunc::Parms; i < nargs; i++) {
1727     Node* arg = argument(i-TypeFunc::Parms);
1728     if (ValueTypePassFieldsAsArgs) {
1729       if (arg->is_ValueType()) {
1730         ValueTypeNode* vt = arg->as_ValueType();
1731         if (domain->field_at(i)->is_valuetypeptr()->klass() != C->env()->___Value_klass()) {
1732           // We don't pass value type arguments by reference but instead
1733           // pass each field of the value type
1734           idx += vt->set_arguments_for_java_call(call, idx, *this);
1735         } else {
1736           arg = arg->as_ValueType()->store_to_memory(this);
1737           call->init_req(idx, arg);
1738           idx++;
1739         }
1740         // If a value type argument is passed as fields, attach the Method* to the call site
1741         // to be able to access the extended signature later via attached_method_before_pc().
1742         // For example, see CompiledMethod::preserve_callee_argument_oops().
1743         call->set_override_symbolic_info(true);
1744       } else {
1745         call->init_req(idx, arg);
1746         idx++;
1747       }
1748     } else {
1749       if (arg->is_ValueType()) {
1750         // Pass value type argument via oop to callee
1751         arg = arg->as_ValueType()->store_to_memory(this);
1752       }
1753       call->init_req(i, arg);
1754     }
1755   }
1756 }
1757 
1758 //---------------------------set_edges_for_java_call---------------------------
1759 // Connect a newly created call into the current JVMS.
1760 // A return value node (if any) is returned from set_edges_for_java_call.
1761 void GraphKit::set_edges_for_java_call(CallJavaNode* call, bool must_throw, bool separate_io_proj) {
1762 
1763   // Add the predefined inputs:


< prev index next >