Mercurial > hg > graal-jvmci-8
changeset 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 | 3288958bf319 |
children | e2ae28d2ce91 |
files | src/share/vm/opto/library_call.cpp |
diffstat | 1 files changed, 1 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/vm/opto/library_call.cpp Fri Feb 29 09:57:18 2008 -0800 +++ b/src/share/vm/opto/library_call.cpp Fri Feb 29 11:22:27 2008 -0800 @@ -4170,6 +4170,7 @@ && !_gvn.eqv_uncast(src, dest) && ((alloc = tightly_coupled_allocation(dest, slow_region)) != NULL) + && _gvn.find_int_con(alloc->in(AllocateNode::ALength), 1) > 0 && alloc->maybe_set_complete(&_gvn)) { // "You break it, you buy it." InitializeNode* init = alloc->initialization();