comparison src/share/vm/opto/machnode.cpp @ 1137:97125851f396

6829187: compiler optimizations required for JSR 292 Summary: C2 implementation for invokedynamic support. Reviewed-by: kvn, never
author twisti
date Tue, 05 Jan 2010 13:05:58 +0100
parents 18f526145aea
children c18cbe5936b8
comparison
equal deleted inserted replaced
1136:4b84186a8248 1137:97125851f396
634 MachCallJavaNode &call = (MachCallJavaNode&)n; 634 MachCallJavaNode &call = (MachCallJavaNode&)n;
635 return MachCallNode::cmp(call) && _method->equals(call._method); 635 return MachCallNode::cmp(call) && _method->equals(call._method);
636 } 636 }
637 #ifndef PRODUCT 637 #ifndef PRODUCT
638 void MachCallJavaNode::dump_spec(outputStream *st) const { 638 void MachCallJavaNode::dump_spec(outputStream *st) const {
639 if( _method ) { 639 if (_method_handle_invoke)
640 st->print("MethodHandle ");
641 if (_method) {
640 _method->print_short_name(st); 642 _method->print_short_name(st);
641 st->print(" "); 643 st->print(" ");
642 } 644 }
643 MachCallNode::dump_spec(st); 645 MachCallNode::dump_spec(st);
644 } 646 }
645 #endif 647 #endif
648
649 //------------------------------Registers--------------------------------------
650 const RegMask &MachCallJavaNode::in_RegMask(uint idx) const {
651 // Values in the domain use the users calling convention, embodied in the
652 // _in_rms array of RegMasks.
653 if (idx < tf()->domain()->cnt()) return _in_rms[idx];
654 // Values outside the domain represent debug info
655 Matcher* m = Compile::current()->matcher();
656 // If this call is a MethodHandle invoke we have to use a different
657 // debugmask which does not include the register we use to save the
658 // SP over MH invokes.
659 RegMask** debugmask = _method_handle_invoke ? m->idealreg2mhdebugmask : m->idealreg2debugmask;
660 return *debugmask[in(idx)->ideal_reg()];
661 }
646 662
647 //============================================================================= 663 //=============================================================================
648 uint MachCallStaticJavaNode::size_of() const { return sizeof(*this); } 664 uint MachCallStaticJavaNode::size_of() const { return sizeof(*this); }
649 uint MachCallStaticJavaNode::cmp( const Node &n ) const { 665 uint MachCallStaticJavaNode::cmp( const Node &n ) const {
650 MachCallStaticJavaNode &call = (MachCallStaticJavaNode&)n; 666 MachCallStaticJavaNode &call = (MachCallStaticJavaNode&)n;