< prev index next >

src/share/vm/opto/machnode.cpp

Print this page
rev 10504 : value type calling convention


 676     if (use->as_Proj()->_con == TypeFunc::Parms) {
 677       return true;
 678     }
 679   }
 680   return false;
 681 }
 682 
 683 // Similar to cousin class CallNode::returns_pointer
 684 // Because this is used in deoptimization, we want the type info, not the data
 685 // flow info; the interpreter will "use" things that are dead to the optimizer.
 686 bool MachCallNode::returns_pointer() const {
 687   const TypeTuple *r = tf()->range();
 688   return (r->cnt() > TypeFunc::Parms &&
 689           r->field_at(TypeFunc::Parms)->isa_ptr());
 690 }
 691 
 692 //------------------------------Registers--------------------------------------
 693 const RegMask &MachCallNode::in_RegMask(uint idx) const {
 694   // Values in the domain use the users calling convention, embodied in the
 695   // _in_rms array of RegMasks.
 696   if (idx < tf()->domain()->cnt()) {
 697     return _in_rms[idx];
 698   }
 699   if (idx == mach_constant_base_node_input()) {
 700     return MachConstantBaseNode::static_out_RegMask();
 701   }
 702   // Values outside the domain represent debug info
 703   return *Compile::current()->matcher()->idealreg2debugmask[in(idx)->ideal_reg()];
 704 }
 705 
 706 //=============================================================================
 707 uint MachCallJavaNode::size_of() const { return sizeof(*this); }
 708 uint MachCallJavaNode::cmp( const Node &n ) const {
 709   MachCallJavaNode &call = (MachCallJavaNode&)n;
 710   return MachCallNode::cmp(call) && _method->equals(call._method) &&
 711          _override_symbolic_info == call._override_symbolic_info;
 712 }
 713 #ifndef PRODUCT
 714 void MachCallJavaNode::dump_spec(outputStream *st) const {
 715   if (_method_handle_invoke)
 716     st->print("MethodHandle ");
 717   if (_method) {
 718     _method->print_short_name(st);
 719     st->print(" ");
 720   }
 721   MachCallNode::dump_spec(st);
 722 }
 723 #endif
 724 
 725 //------------------------------Registers--------------------------------------
 726 const RegMask &MachCallJavaNode::in_RegMask(uint idx) const {
 727   // Values in the domain use the users calling convention, embodied in the
 728   // _in_rms array of RegMasks.
 729   if (idx < tf()->domain()->cnt()) {
 730     return _in_rms[idx];
 731   }
 732   if (idx == mach_constant_base_node_input()) {
 733     return MachConstantBaseNode::static_out_RegMask();
 734   }
 735   // Values outside the domain represent debug info
 736   Matcher* m = Compile::current()->matcher();
 737   // If this call is a MethodHandle invoke we have to use a different
 738   // debugmask which does not include the register we use to save the
 739   // SP over MH invokes.
 740   RegMask** debugmask = _method_handle_invoke ? m->idealreg2mhdebugmask : m->idealreg2debugmask;
 741   return *debugmask[in(idx)->ideal_reg()];
 742 }
 743 
 744 //=============================================================================
 745 uint MachCallStaticJavaNode::size_of() const { return sizeof(*this); }
 746 uint MachCallStaticJavaNode::cmp( const Node &n ) const {
 747   MachCallStaticJavaNode &call = (MachCallStaticJavaNode&)n;
 748   return MachCallJavaNode::cmp(call) && _name == call._name;
 749 }




 676     if (use->as_Proj()->_con == TypeFunc::Parms) {
 677       return true;
 678     }
 679   }
 680   return false;
 681 }
 682 
 683 // Similar to cousin class CallNode::returns_pointer
 684 // Because this is used in deoptimization, we want the type info, not the data
 685 // flow info; the interpreter will "use" things that are dead to the optimizer.
 686 bool MachCallNode::returns_pointer() const {
 687   const TypeTuple *r = tf()->range();
 688   return (r->cnt() > TypeFunc::Parms &&
 689           r->field_at(TypeFunc::Parms)->isa_ptr());
 690 }
 691 
 692 //------------------------------Registers--------------------------------------
 693 const RegMask &MachCallNode::in_RegMask(uint idx) const {
 694   // Values in the domain use the users calling convention, embodied in the
 695   // _in_rms array of RegMasks.
 696   if (idx < tf()->domain_sig()->cnt()) {
 697     return _in_rms[idx];
 698   }
 699   if (idx == mach_constant_base_node_input()) {
 700     return MachConstantBaseNode::static_out_RegMask();
 701   }
 702   // Values outside the domain represent debug info
 703   return *Compile::current()->matcher()->idealreg2debugmask[in(idx)->ideal_reg()];
 704 }
 705 
 706 //=============================================================================
 707 uint MachCallJavaNode::size_of() const { return sizeof(*this); }
 708 uint MachCallJavaNode::cmp( const Node &n ) const {
 709   MachCallJavaNode &call = (MachCallJavaNode&)n;
 710   return MachCallNode::cmp(call) && _method->equals(call._method) &&
 711          _override_symbolic_info == call._override_symbolic_info;
 712 }
 713 #ifndef PRODUCT
 714 void MachCallJavaNode::dump_spec(outputStream *st) const {
 715   if (_method_handle_invoke)
 716     st->print("MethodHandle ");
 717   if (_method) {
 718     _method->print_short_name(st);
 719     st->print(" ");
 720   }
 721   MachCallNode::dump_spec(st);
 722 }
 723 #endif
 724 
 725 //------------------------------Registers--------------------------------------
 726 const RegMask &MachCallJavaNode::in_RegMask(uint idx) const {
 727   // Values in the domain use the users calling convention, embodied in the
 728   // _in_rms array of RegMasks.
 729   if (idx < tf()->domain_cc()->cnt()) {
 730     return _in_rms[idx];
 731   }
 732   if (idx == mach_constant_base_node_input()) {
 733     return MachConstantBaseNode::static_out_RegMask();
 734   }
 735   // Values outside the domain represent debug info
 736   Matcher* m = Compile::current()->matcher();
 737   // If this call is a MethodHandle invoke we have to use a different
 738   // debugmask which does not include the register we use to save the
 739   // SP over MH invokes.
 740   RegMask** debugmask = _method_handle_invoke ? m->idealreg2mhdebugmask : m->idealreg2debugmask;
 741   return *debugmask[in(idx)->ideal_reg()];
 742 }
 743 
 744 //=============================================================================
 745 uint MachCallStaticJavaNode::size_of() const { return sizeof(*this); }
 746 uint MachCallStaticJavaNode::cmp( const Node &n ) const {
 747   MachCallStaticJavaNode &call = (MachCallStaticJavaNode&)n;
 748   return MachCallJavaNode::cmp(call) && _name == call._name;
 749 }


< prev index next >