comparison src/share/vm/opto/parse3.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 11a4af030e4b
children b9a9ed0f8eeb
comparison
equal deleted inserted replaced
6803:06f52c4d0e18 6804:e626685e9f6c
508 OptoRuntime::multianewarrayN_Java(), NULL, TypeRawPtr::BOTTOM, 508 OptoRuntime::multianewarrayN_Java(), NULL, TypeRawPtr::BOTTOM,
509 makecon(TypeKlassPtr::make(array_klass)), 509 makecon(TypeKlassPtr::make(array_klass)),
510 dims); 510 dims);
511 } 511 }
512 512
513 Node* res = _gvn.transform(new (C, 1) ProjNode(c, TypeFunc::Parms)); 513 Node* res = _gvn.transform(new (C) ProjNode(c, TypeFunc::Parms));
514 514
515 const Type* type = TypeOopPtr::make_from_klass_raw(array_klass); 515 const Type* type = TypeOopPtr::make_from_klass_raw(array_klass);
516 516
517 // Improve the type: We know it's not null, exact, and of a given length. 517 // Improve the type: We know it's not null, exact, and of a given length.
518 type = type->is_ptr()->cast_to_ptr_type(TypePtr::NotNull); 518 type = type->is_ptr()->cast_to_ptr_type(TypePtr::NotNull);
522 if (ltype != NULL) 522 if (ltype != NULL)
523 type = type->is_aryptr()->cast_to_size(ltype); 523 type = type->is_aryptr()->cast_to_size(ltype);
524 524
525 // We cannot sharpen the nested sub-arrays, since the top level is mutable. 525 // We cannot sharpen the nested sub-arrays, since the top level is mutable.
526 526
527 Node* cast = _gvn.transform( new (C, 2) CheckCastPPNode(control(), res, type) ); 527 Node* cast = _gvn.transform( new (C) CheckCastPPNode(control(), res, type) );
528 push(cast); 528 push(cast);
529 529
530 // Possible improvements: 530 // Possible improvements:
531 // - Make a fast path for small multi-arrays. (W/ implicit init. loops.) 531 // - Make a fast path for small multi-arrays. (W/ implicit init. loops.)
532 // - Issue CastII against length[*] values, to TypeInt::POS. 532 // - Issue CastII against length[*] values, to TypeInt::POS.