comparison src/share/vm/opto/library_call.cpp @ 34:545c277a3ecf

6667581: Don't generate initialization (by 0) code for arrays with size 0 Summary: generate_arraycopy() does not check the size of allocated array. Reviewed-by: jrose, never
author kvn
date Fri, 29 Feb 2008 11:22:27 -0800
parents d5fc211aea19
children ba764ed4b6f2
comparison
equal deleted inserted replaced
33:3288958bf319 34:545c277a3ecf
4168 && !ZeroTLAB // pointless if already zeroed 4168 && !ZeroTLAB // pointless if already zeroed
4169 && basic_elem_type != T_CONFLICT // avoid corner case 4169 && basic_elem_type != T_CONFLICT // avoid corner case
4170 && !_gvn.eqv_uncast(src, dest) 4170 && !_gvn.eqv_uncast(src, dest)
4171 && ((alloc = tightly_coupled_allocation(dest, slow_region)) 4171 && ((alloc = tightly_coupled_allocation(dest, slow_region))
4172 != NULL) 4172 != NULL)
4173 && _gvn.find_int_con(alloc->in(AllocateNode::ALength), 1) > 0
4173 && alloc->maybe_set_complete(&_gvn)) { 4174 && alloc->maybe_set_complete(&_gvn)) {
4174 // "You break it, you buy it." 4175 // "You break it, you buy it."
4175 InitializeNode* init = alloc->initialization(); 4176 InitializeNode* init = alloc->initialization();
4176 assert(init->is_complete(), "we just did this"); 4177 assert(init->is_complete(), "we just did this");
4177 assert(dest->Opcode() == Op_CheckCastPP, "sanity"); 4178 assert(dest->Opcode() == Op_CheckCastPP, "sanity");