Mercurial > hg > truffle
diff src/share/vm/opto/callnode.cpp @ 6804:e626685e9f6c
7193318: C2: remove number of inputs requirement from Node's new operator
Summary: Deleted placement new operator of Node - node(size_t, Compile *, int).
Reviewed-by: kvn, twisti
Contributed-by: bharadwaj.yadavalli@oracle.com
author | kvn |
---|---|
date | Thu, 27 Sep 2012 09:38:42 -0700 |
parents | da91efe96a93 |
children | ad5dd04754ee |
line wrap: on
line diff
--- a/src/share/vm/opto/callnode.cpp Tue Sep 25 15:48:17 2012 -0700 +++ b/src/share/vm/opto/callnode.cpp Thu Sep 27 09:38:42 2012 -0700 @@ -72,20 +72,20 @@ case TypeFunc::Control: case TypeFunc::I_O: case TypeFunc::Memory: - return new (match->C, 1) MachProjNode(this,proj->_con,RegMask::Empty,MachProjNode::unmatched_proj); + return new (match->C) MachProjNode(this,proj->_con,RegMask::Empty,MachProjNode::unmatched_proj); case TypeFunc::FramePtr: - return new (match->C, 1) MachProjNode(this,proj->_con,Matcher::c_frame_ptr_mask, Op_RegP); + return new (match->C) MachProjNode(this,proj->_con,Matcher::c_frame_ptr_mask, Op_RegP); case TypeFunc::ReturnAdr: - return new (match->C, 1) MachProjNode(this,proj->_con,match->_return_addr_mask,Op_RegP); + return new (match->C) MachProjNode(this,proj->_con,match->_return_addr_mask,Op_RegP); case TypeFunc::Parms: default: { uint parm_num = proj->_con - TypeFunc::Parms; const Type *t = _domain->field_at(proj->_con); if (t->base() == Type::Half) // 2nd half of Longs and Doubles - return new (match->C, 1) ConNode(Type::TOP); + return new (match->C) ConNode(Type::TOP); uint ideal_reg = t->ideal_reg(); RegMask &rm = match->_calling_convention_mask[parm_num]; - return new (match->C, 1) MachProjNode(this,proj->_con,rm,ideal_reg); + return new (match->C) MachProjNode(this,proj->_con,rm,ideal_reg); } } return NULL; @@ -625,12 +625,12 @@ case TypeFunc::Control: case TypeFunc::I_O: case TypeFunc::Memory: - return new (match->C, 1) MachProjNode(this,proj->_con,RegMask::Empty,MachProjNode::unmatched_proj); + return new (match->C) MachProjNode(this,proj->_con,RegMask::Empty,MachProjNode::unmatched_proj); case TypeFunc::Parms+1: // For LONG & DOUBLE returns assert(tf()->_range->field_at(TypeFunc::Parms+1) == Type::HALF, ""); // 2nd half of doubles and longs - return new (match->C, 1) MachProjNode(this,proj->_con, RegMask::Empty, (uint)OptoReg::Bad); + return new (match->C) MachProjNode(this,proj->_con, RegMask::Empty, (uint)OptoReg::Bad); case TypeFunc::Parms: { // Normal returns uint ideal_reg = tf()->range()->field_at(TypeFunc::Parms)->ideal_reg(); @@ -640,7 +640,7 @@ RegMask rm = RegMask(regs.first()); if( OptoReg::is_valid(regs.second()) ) rm.Insert( regs.second() ); - return new (match->C, 1) MachProjNode(this,proj->_con,rm,ideal_reg); + return new (match->C) MachProjNode(this,proj->_con,rm,ideal_reg); } case TypeFunc::ReturnAdr: @@ -1175,10 +1175,10 @@ Node* nproj = catchproj->clone(); igvn->register_new_node_with_optimizer(nproj); - Node *frame = new (phase->C, 1) ParmNode( phase->C->start(), TypeFunc::FramePtr ); + Node *frame = new (phase->C) ParmNode( phase->C->start(), TypeFunc::FramePtr ); frame = phase->transform(frame); // Halt & Catch Fire - Node *halt = new (phase->C, TypeFunc::Parms) HaltNode( nproj, frame ); + Node *halt = new (phase->C) HaltNode( nproj, frame ); phase->C->root()->add_req(halt); phase->transform(halt); @@ -1218,7 +1218,7 @@ if (!allow_new_nodes) return NULL; // Create a cast which is control dependent on the initialization to // propagate the fact that the array length must be positive. - length = new (phase->C, 2) CastIINode(length, narrow_length_type); + length = new (phase->C) CastIINode(length, narrow_length_type); length->set_req(0, initialization()->proj_out(0)); } }