Mercurial > hg > graal-compiler
diff 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 |
line wrap: on
line diff
--- a/src/share/vm/opto/machnode.cpp Mon Jan 04 15:21:09 2010 -0800 +++ b/src/share/vm/opto/machnode.cpp Tue Jan 05 13:05:58 2010 +0100 @@ -636,7 +636,9 @@ } #ifndef PRODUCT void MachCallJavaNode::dump_spec(outputStream *st) const { - if( _method ) { + if (_method_handle_invoke) + st->print("MethodHandle "); + if (_method) { _method->print_short_name(st); st->print(" "); } @@ -644,6 +646,20 @@ } #endif +//------------------------------Registers-------------------------------------- +const RegMask &MachCallJavaNode::in_RegMask(uint idx) const { + // Values in the domain use the users calling convention, embodied in the + // _in_rms array of RegMasks. + if (idx < tf()->domain()->cnt()) return _in_rms[idx]; + // Values outside the domain represent debug info + Matcher* m = Compile::current()->matcher(); + // If this call is a MethodHandle invoke we have to use a different + // debugmask which does not include the register we use to save the + // SP over MH invokes. + RegMask** debugmask = _method_handle_invoke ? m->idealreg2mhdebugmask : m->idealreg2debugmask; + return *debugmask[in(idx)->ideal_reg()]; +} + //============================================================================= uint MachCallStaticJavaNode::size_of() const { return sizeof(*this); } uint MachCallStaticJavaNode::cmp( const Node &n ) const {