* don't insert checkcast operations for types that are considered to be

te_equal

git-svn-id: branches/jvmbackend@18529 -
This commit is contained in:
Jonas Maebe 2011-08-20 08:07:35 +00:00
parent e8ec2c45af
commit b8f6c42ec7

View File

@ -494,8 +494,9 @@ implementation
get_most_nested_types(fromdef,todef);
fromarrtype:=jvmarrtype_setlength(fromdef);
toarrtype:=jvmarrtype_setlength(todef);
if not fromdef.is_related(todef) and
(((fromdef.typ<>objectdef) and
if (compare_defs(fromdef,todef,nothingn)<te_equal) and
not fromdef.is_related(todef) and
(((fromdef.typ in [objectdef,recorddef,stringdef]) and
not is_dynamic_array(fromdef)) or
(todef<>java_jlobject)) and
((fromarrtype in ['A','R']) or