< prev index next >

src/share/vm/opto/graphKit.cpp

Print this page




1592   }
1593   Node* ld = make_load(ctl, adr, elemtype, elembt, arytype, MemNode::unordered);
1594   return ld;
1595 }
1596 
1597 //-------------------------set_arguments_for_java_call-------------------------
1598 // Arguments (pre-popped from the stack) are taken from the JVMS.
1599 void GraphKit::set_arguments_for_java_call(CallJavaNode* call) {
1600   // Add the call arguments:
1601   const TypeTuple* domain = call->tf()->domain_sig();
1602   uint nargs = domain->cnt();
1603   for (uint i = TypeFunc::Parms, idx = TypeFunc::Parms; i < nargs; i++) {
1604     Node* arg = argument(i-TypeFunc::Parms);
1605     if (ValueTypePassFieldsAsArgs) {
1606       if (arg->is_ValueType()) {
1607         ValueTypeNode* vt = arg->as_ValueType();
1608         if (domain->field_at(i)->is_valuetypeptr()->klass() != C->env()->___Value_klass()) {
1609           // We don't pass value type arguments by reference but instead
1610           // pass each field of the value type
1611           idx += vt->pass_fields(call, idx, *this);




1612         } else {
1613           arg = arg->as_ValueType()->allocate(this);
1614           call->init_req(idx, arg);
1615           idx++;
1616         }
1617         // If a value type argument is passed as fields, attach the Method* to the call site
1618         // to be able to access the extended signature later via attached_method_before_pc().
1619         // For example, see CompiledMethod::preserve_callee_argument_oops().
1620         call->set_override_symbolic_info(true);
1621       } else {
1622         call->init_req(idx, arg);
1623         idx++;
1624       }
1625     } else {
1626       if (arg->is_ValueType()) {
1627         // Pass value type argument via oop to callee
1628         arg = arg->as_ValueType()->allocate(this);
1629       }
1630       call->init_req(i, arg);
1631     }
1632   }
1633 }
1634 
1635 //---------------------------set_edges_for_java_call---------------------------
1636 // Connect a newly created call into the current JVMS.
1637 // A return value node (if any) is returned from set_edges_for_java_call.
1638 void GraphKit::set_edges_for_java_call(CallJavaNode* call, bool must_throw, bool separate_io_proj) {
1639 
1640   // Add the predefined inputs:




1592   }
1593   Node* ld = make_load(ctl, adr, elemtype, elembt, arytype, MemNode::unordered);
1594   return ld;
1595 }
1596 
1597 //-------------------------set_arguments_for_java_call-------------------------
1598 // Arguments (pre-popped from the stack) are taken from the JVMS.
1599 void GraphKit::set_arguments_for_java_call(CallJavaNode* call) {
1600   // Add the call arguments:
1601   const TypeTuple* domain = call->tf()->domain_sig();
1602   uint nargs = domain->cnt();
1603   for (uint i = TypeFunc::Parms, idx = TypeFunc::Parms; i < nargs; i++) {
1604     Node* arg = argument(i-TypeFunc::Parms);
1605     if (ValueTypePassFieldsAsArgs) {
1606       if (arg->is_ValueType()) {
1607         ValueTypeNode* vt = arg->as_ValueType();
1608         if (domain->field_at(i)->is_valuetypeptr()->klass() != C->env()->___Value_klass()) {
1609           // We don't pass value type arguments by reference but instead
1610           // pass each field of the value type
1611           idx += vt->pass_fields(call, idx, *this);
1612           // If a value type argument is passed as fields, attach the Method* to the call site
1613           // to be able to access the extended signature later via attached_method_before_pc().
1614           // For example, see CompiledMethod::preserve_callee_argument_oops().
1615           call->set_override_symbolic_info(true);
1616         } else {
1617           arg = arg->as_ValueType()->allocate(this);
1618           call->init_req(idx, arg);
1619           idx++;
1620         }




1621       } else {
1622         call->init_req(idx, arg);
1623         idx++;
1624       }
1625     } else {
1626       if (arg->is_ValueType()) {
1627         // Pass value type argument via oop to callee
1628         arg = arg->as_ValueType()->allocate(this);
1629       }
1630       call->init_req(i, arg);
1631     }
1632   }
1633 }
1634 
1635 //---------------------------set_edges_for_java_call---------------------------
1636 // Connect a newly created call into the current JVMS.
1637 // A return value node (if any) is returned from set_edges_for_java_call.
1638 void GraphKit::set_edges_for_java_call(CallJavaNode* call, bool must_throw, bool separate_io_proj) {
1639 
1640   // Add the predefined inputs:


< prev index next >