mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-30 21:40:21 +02:00
* when internally taking the address of shortstrings to typecast
them to shortstringclass, make sure the address operator is "typed" so that we don't insert useless checkcast instructions git-svn-id: branches/jvmbackend@18621 -
This commit is contained in:
parent
569228447d
commit
bf2854dae5
@ -98,6 +98,8 @@ function tjvmassignmentnode.pass_1: tnode;
|
||||
inserttypeconv_explicit(right,cchartype);
|
||||
{ call ShortstringClass(@shortstring).setChar(index,char) }
|
||||
tvecnode(target).left:=caddrnode.create_internal(tvecnode(target).left);
|
||||
{ avoid useless typecheck when casting to shortstringclass }
|
||||
include(tvecnode(target).left.flags,nf_typedaddr);
|
||||
inserttypeconv_explicit(tvecnode(target).left,java_shortstring);
|
||||
psym:=search_struct_member(tabstractrecorddef(java_shortstring),'SETCHAR');
|
||||
if not assigned(psym) or
|
||||
|
@ -218,6 +218,8 @@ implementation
|
||||
begin
|
||||
stringclass:=java_shortstring;
|
||||
left:=caddrnode.create_internal(left);
|
||||
{ avoid useless typecheck when casting to shortstringclass }
|
||||
include(left.flags,nf_typedaddr);
|
||||
end
|
||||
else
|
||||
internalerror(2011052407);
|
||||
|
Loading…
Reference in New Issue
Block a user