1.1 --- a/src/share/vm/opto/callnode.cpp Fri Jan 18 05:33:32 2013 -0800 1.2 +++ b/src/share/vm/opto/callnode.cpp Tue Jan 22 11:31:25 2013 -0800 1.3 @@ -165,13 +165,13 @@ 1.4 1.5 1.6 #ifndef PRODUCT 1.7 -void ReturnNode::dump_req() const { 1.8 +void ReturnNode::dump_req(outputStream *st) const { 1.9 // Dump the required inputs, enclosed in '(' and ')' 1.10 uint i; // Exit value of loop 1.11 - for( i=0; i<req(); i++ ) { // For all required inputs 1.12 - if( i == TypeFunc::Parms ) tty->print("returns"); 1.13 - if( in(i) ) tty->print("%c%d ", Compile::current()->node_arena()->contains(in(i)) ? ' ' : 'o', in(i)->_idx); 1.14 - else tty->print("_ "); 1.15 + for (i = 0; i < req(); i++) { // For all required inputs 1.16 + if (i == TypeFunc::Parms) st->print("returns"); 1.17 + if (in(i)) st->print("%c%d ", Compile::current()->node_arena()->contains(in(i)) ? ' ' : 'o', in(i)->_idx); 1.18 + else st->print("_ "); 1.19 } 1.20 } 1.21 #endif 1.22 @@ -208,13 +208,13 @@ 1.23 } 1.24 1.25 #ifndef PRODUCT 1.26 -void RethrowNode::dump_req() const { 1.27 +void RethrowNode::dump_req(outputStream *st) const { 1.28 // Dump the required inputs, enclosed in '(' and ')' 1.29 uint i; // Exit value of loop 1.30 - for( i=0; i<req(); i++ ) { // For all required inputs 1.31 - if( i == TypeFunc::Parms ) tty->print("exception"); 1.32 - if( in(i) ) tty->print("%c%d ", Compile::current()->node_arena()->contains(in(i)) ? ' ' : 'o', in(i)->_idx); 1.33 - else tty->print("_ "); 1.34 + for (i = 0; i < req(); i++) { // For all required inputs 1.35 + if (i == TypeFunc::Parms) st->print("exception"); 1.36 + if (in(i)) st->print("%c%d ", Compile::current()->node_arena()->contains(in(i)) ? ' ' : 'o', in(i)->_idx); 1.37 + else st->print("_ "); 1.38 } 1.39 } 1.40 #endif 1.41 @@ -330,7 +330,8 @@ 1.42 st->print(" %s%d]=#ScObj" INT32_FORMAT, msg, i, sco_n); 1.43 return; 1.44 } 1.45 - if( OptoReg::is_valid(regalloc->get_reg_first(n))) { // Check for undefined 1.46 + if (regalloc->node_regs_max_index() > 0 && 1.47 + OptoReg::is_valid(regalloc->get_reg_first(n))) { // Check for undefined 1.48 char buf[50]; 1.49 regalloc->dump_register(n,buf); 1.50 st->print(" %s%d]=%s",msg,i,buf); 1.51 @@ -381,7 +382,7 @@ 1.52 //------------------------------format----------------------------------------- 1.53 void JVMState::format(PhaseRegAlloc *regalloc, const Node *n, outputStream* st) const { 1.54 st->print(" #"); 1.55 - if( _method ) { 1.56 + if (_method) { 1.57 _method->print_short_name(st); 1.58 st->print(" @ bci:%d ",_bci); 1.59 } else { 1.60 @@ -393,21 +394,22 @@ 1.61 MachSafePointNode *mcall = n->as_MachSafePoint(); 1.62 uint i; 1.63 // Print locals 1.64 - for( i = 0; i < (uint)loc_size(); i++ ) 1.65 - format_helper( regalloc, st, mcall->local(this, i), "L[", i, &scobjs ); 1.66 + for (i = 0; i < (uint)loc_size(); i++) 1.67 + format_helper(regalloc, st, mcall->local(this, i), "L[", i, &scobjs); 1.68 // Print stack 1.69 for (i = 0; i < (uint)stk_size(); i++) { 1.70 if ((uint)(_stkoff + i) >= mcall->len()) 1.71 st->print(" oob "); 1.72 else 1.73 - format_helper( regalloc, st, mcall->stack(this, i), "STK[", i, &scobjs ); 1.74 + format_helper(regalloc, st, mcall->stack(this, i), "STK[", i, &scobjs); 1.75 } 1.76 for (i = 0; (int)i < nof_monitors(); i++) { 1.77 Node *box = mcall->monitor_box(this, i); 1.78 Node *obj = mcall->monitor_obj(this, i); 1.79 - if ( OptoReg::is_valid(regalloc->get_reg_first(box)) ) { 1.80 + if (regalloc->node_regs_max_index() > 0 && 1.81 + OptoReg::is_valid(regalloc->get_reg_first(box))) { 1.82 box = BoxLockNode::box_node(box); 1.83 - format_helper( regalloc, st, box, "MON-BOX[", i, &scobjs ); 1.84 + format_helper(regalloc, st, box, "MON-BOX[", i, &scobjs); 1.85 } else { 1.86 OptoReg::Name box_reg = BoxLockNode::reg(box); 1.87 st->print(" MON-BOX%d=%s+%d", 1.88 @@ -420,7 +422,7 @@ 1.89 if (BoxLockNode::box_node(box)->is_eliminated()) 1.90 obj_msg = "MON-OBJ(LOCK ELIMINATED)["; 1.91 } 1.92 - format_helper( regalloc, st, obj, obj_msg, i, &scobjs ); 1.93 + format_helper(regalloc, st, obj, obj_msg, i, &scobjs); 1.94 } 1.95 1.96 for (i = 0; i < (uint)scobjs.length(); i++) { 1.97 @@ -463,9 +465,9 @@ 1.98 st->print(" ["); 1.99 cifield = iklass->nonstatic_field_at(0); 1.100 cifield->print_name_on(st); 1.101 - format_helper( regalloc, st, fld_node, ":", 0, &scobjs ); 1.102 + format_helper(regalloc, st, fld_node, ":", 0, &scobjs); 1.103 } else { 1.104 - format_helper( regalloc, st, fld_node, "[", 0, &scobjs ); 1.105 + format_helper(regalloc, st, fld_node, "[", 0, &scobjs); 1.106 } 1.107 for (uint j = 1; j < nf; j++) { 1.108 fld_node = mcall->in(first_ind+j); 1.109 @@ -473,9 +475,9 @@ 1.110 st->print(", ["); 1.111 cifield = iklass->nonstatic_field_at(j); 1.112 cifield->print_name_on(st); 1.113 - format_helper( regalloc, st, fld_node, ":", j, &scobjs ); 1.114 + format_helper(regalloc, st, fld_node, ":", j, &scobjs); 1.115 } else { 1.116 - format_helper( regalloc, st, fld_node, ", [", j, &scobjs ); 1.117 + format_helper(regalloc, st, fld_node, ", [", j, &scobjs); 1.118 } 1.119 } 1.120 } 1.121 @@ -483,7 +485,7 @@ 1.122 } 1.123 } 1.124 st->print_cr(""); 1.125 - if (caller() != NULL) caller()->format(regalloc, n, st); 1.126 + if (caller() != NULL) caller()->format(regalloc, n, st); 1.127 } 1.128 1.129 1.130 @@ -586,15 +588,15 @@ 1.131 uint CallNode::cmp( const Node &n ) const 1.132 { return _tf == ((CallNode&)n)._tf && _jvms == ((CallNode&)n)._jvms; } 1.133 #ifndef PRODUCT 1.134 -void CallNode::dump_req() const { 1.135 +void CallNode::dump_req(outputStream *st) const { 1.136 // Dump the required inputs, enclosed in '(' and ')' 1.137 uint i; // Exit value of loop 1.138 - for( i=0; i<req(); i++ ) { // For all required inputs 1.139 - if( i == TypeFunc::Parms ) tty->print("("); 1.140 - if( in(i) ) tty->print("%c%d ", Compile::current()->node_arena()->contains(in(i)) ? ' ' : 'o', in(i)->_idx); 1.141 - else tty->print("_ "); 1.142 + for (i = 0; i < req(); i++) { // For all required inputs 1.143 + if (i == TypeFunc::Parms) st->print("("); 1.144 + if (in(i)) st->print("%c%d ", Compile::current()->node_arena()->contains(in(i)) ? ' ' : 'o', in(i)->_idx); 1.145 + else st->print("_ "); 1.146 } 1.147 - tty->print(")"); 1.148 + st->print(")"); 1.149 } 1.150 1.151 void CallNode::dump_spec(outputStream *st) const {