src/share/vm/opto/parse3.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File 8034812 Sdiff src/share/vm/opto

src/share/vm/opto/parse3.cpp

Print this page




 535     { PreserveReexecuteState preexecs(this);
 536       inc_sp(ndimensions);
 537       Node* dims_array_klass = makecon(TypeKlassPtr::make(ciArrayKlass::make(ciType::make(T_INT))));
 538       dims = new_array(dims_array_klass, intcon(ndimensions), 0);
 539 
 540       // Fill-in it with values
 541       for (j = 0; j < ndimensions; j++) {
 542         Node *dims_elem = array_element_address(dims, intcon(j), T_INT);
 543         store_to_memory(control(), dims_elem, length[j], T_INT, TypeAryPtr::INTS, MemNode::unordered);
 544       }
 545     }
 546 
 547     c = make_runtime_call(RC_NO_LEAF | RC_NO_IO,
 548                           OptoRuntime::multianewarrayN_Type(),
 549                           OptoRuntime::multianewarrayN_Java(), NULL, TypeRawPtr::BOTTOM,
 550                           makecon(TypeKlassPtr::make(array_klass)),
 551                           dims);
 552   }
 553   make_slow_call_ex(c, env()->Throwable_klass(), false);
 554 
 555   Node* res = _gvn.transform(new (C) ProjNode(c, TypeFunc::Parms));
 556 
 557   const Type* type = TypeOopPtr::make_from_klass_raw(array_klass);
 558 
 559   // Improve the type:  We know it's not null, exact, and of a given length.
 560   type = type->is_ptr()->cast_to_ptr_type(TypePtr::NotNull);
 561   type = type->is_aryptr()->cast_to_exactness(true);
 562 
 563   const TypeInt* ltype = _gvn.find_int_type(length[0]);
 564   if (ltype != NULL)
 565     type = type->is_aryptr()->cast_to_size(ltype);
 566 
 567     // We cannot sharpen the nested sub-arrays, since the top level is mutable.
 568 
 569   Node* cast = _gvn.transform( new (C) CheckCastPPNode(control(), res, type) );
 570   push(cast);
 571 
 572   // Possible improvements:
 573   // - Make a fast path for small multi-arrays.  (W/ implicit init. loops.)
 574   // - Issue CastII against length[*] values, to TypeInt::POS.
 575 }


 535     { PreserveReexecuteState preexecs(this);
 536       inc_sp(ndimensions);
 537       Node* dims_array_klass = makecon(TypeKlassPtr::make(ciArrayKlass::make(ciType::make(T_INT))));
 538       dims = new_array(dims_array_klass, intcon(ndimensions), 0);
 539 
 540       // Fill-in it with values
 541       for (j = 0; j < ndimensions; j++) {
 542         Node *dims_elem = array_element_address(dims, intcon(j), T_INT);
 543         store_to_memory(control(), dims_elem, length[j], T_INT, TypeAryPtr::INTS, MemNode::unordered);
 544       }
 545     }
 546 
 547     c = make_runtime_call(RC_NO_LEAF | RC_NO_IO,
 548                           OptoRuntime::multianewarrayN_Type(),
 549                           OptoRuntime::multianewarrayN_Java(), NULL, TypeRawPtr::BOTTOM,
 550                           makecon(TypeKlassPtr::make(array_klass)),
 551                           dims);
 552   }
 553   make_slow_call_ex(c, env()->Throwable_klass(), false);
 554 
 555   Node* res = _gvn.transform(new ProjNode(c, TypeFunc::Parms));
 556 
 557   const Type* type = TypeOopPtr::make_from_klass_raw(array_klass);
 558 
 559   // Improve the type:  We know it's not null, exact, and of a given length.
 560   type = type->is_ptr()->cast_to_ptr_type(TypePtr::NotNull);
 561   type = type->is_aryptr()->cast_to_exactness(true);
 562 
 563   const TypeInt* ltype = _gvn.find_int_type(length[0]);
 564   if (ltype != NULL)
 565     type = type->is_aryptr()->cast_to_size(ltype);
 566 
 567     // We cannot sharpen the nested sub-arrays, since the top level is mutable.
 568 
 569   Node* cast = _gvn.transform( new CheckCastPPNode(control(), res, type) );
 570   push(cast);
 571 
 572   // Possible improvements:
 573   // - Make a fast path for small multi-arrays.  (W/ implicit init. loops.)
 574   // - Issue CastII against length[*] values, to TypeInt::POS.
 575 }
src/share/vm/opto/parse3.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File