mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-02 08:29:32 +01:00
* don't insert a conversion to widechar for ansistr[x]:='y' assignments on
the jvm target (forgot to adapt code after adding ansistring support) git-svn-id: trunk@21765 -
This commit is contained in:
parent
71c13190e1
commit
882351bb21
@ -106,9 +106,12 @@ function tjvmassignmentnode.pass_1: tnode;
|
||||
is_ansistring(tvecnode(target).left.resultdef)) then
|
||||
begin
|
||||
{ prevent errors in case of an expression such as
|
||||
word(str[x]):=1234;
|
||||
word(unicodestr[x]):=1234;
|
||||
}
|
||||
inserttypeconv_explicit(right,cwidechartype);
|
||||
if is_wide_or_unicode_string(tvecnode(target).left.resultdef) then
|
||||
inserttypeconv_explicit(right,cwidechartype)
|
||||
else
|
||||
inserttypeconv_explicit(right,cansichartype);
|
||||
result:=ccallnode.createintern('fpc_'+tstringdef(tvecnode(target).left.resultdef).stringtypname+'_setchar',
|
||||
ccallparanode.create(right,
|
||||
ccallparanode.create(tvecnode(target).right,
|
||||
|
||||
@ -240,4 +240,7 @@ ppcjvm -O2 -g -B taddbool
|
||||
if %errorlevel% neq 0 exit /b %errorlevel%
|
||||
java -Dfile.encoding=UTF-8 -cp ..\..\..\rtl\units\jvm-java;. -Sa TAddBool
|
||||
if %errorlevel% neq 0 exit /b %errorlevel%
|
||||
|
||||
ppcjvm -O2 -g -B tsetansistr
|
||||
if %errorlevel% neq 0 exit /b %errorlevel%
|
||||
java -Dfile.encoding=UTF-8 -cp ..\..\..\rtl\units\jvm-java;. -Sa tsetansistr
|
||||
if %errorlevel% neq 0 exit /b %errorlevel%
|
||||
|
||||
@ -135,3 +135,5 @@ $PPC -O2 -g -B -Sa tassert
|
||||
java -Dfile.encoding=UTF-8 -cp ../../../rtl/units/$RTLDIR:. tassert
|
||||
$PPC -O2 -g -B -Sa taddbool
|
||||
java -Dfile.encoding=UTF-8 -cp ../../../rtl/units/$RTLDIR:. TAddBool
|
||||
$PPC -O2 -g -B -Sa tsetansistr
|
||||
java -Dfile.encoding=UTF-8 -cp ../../../rtl/units/$RTLDIR:. tsetansistr
|
||||
|
||||
Loading…
Reference in New Issue
Block a user