mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-11 21:29:42 +02:00
* fixed order of operands on the jvm stack in case of a setlength(x,0) call
for a static field git-svn-id: branches/jvmbackend@18671 -
This commit is contained in:
parent
ff37507bca
commit
d0663411a5
@ -763,6 +763,7 @@ implementation
|
|||||||
target: tnode;
|
target: tnode;
|
||||||
lenpara: tnode;
|
lenpara: tnode;
|
||||||
emptystr: ansichar;
|
emptystr: ansichar;
|
||||||
|
tmpreg: tregister;
|
||||||
begin
|
begin
|
||||||
target:=tcallparanode(left).left;
|
target:=tcallparanode(left).left;
|
||||||
lenpara:=tcallparanode(tcallparanode(left).right).left;
|
lenpara:=tcallparanode(tcallparanode(left).right).left;
|
||||||
@ -772,6 +773,10 @@ implementation
|
|||||||
internalerror(2011031801);
|
internalerror(2011031801);
|
||||||
|
|
||||||
secondpass(target);
|
secondpass(target);
|
||||||
|
{ can't directly load from stack to destination, because if target is
|
||||||
|
a reference then its address must be placed on the stack before the
|
||||||
|
value }
|
||||||
|
tmpreg:=hlcg.getaddressregister(current_asmdata.CurrAsmList,target.resultdef);
|
||||||
if is_wide_or_unicode_string(target.resultdef) then
|
if is_wide_or_unicode_string(target.resultdef) then
|
||||||
begin
|
begin
|
||||||
emptystr:=#0;
|
emptystr:=#0;
|
||||||
@ -787,7 +792,8 @@ implementation
|
|||||||
end
|
end
|
||||||
else
|
else
|
||||||
internalerror(2011031401);
|
internalerror(2011031401);
|
||||||
thlcgjvm(hlcg).a_load_stack_loc(current_asmdata.CurrAsmList,target.resultdef,target.location);
|
thlcgjvm(hlcg).a_load_stack_reg(current_asmdata.CurrAsmList,target.resultdef,tmpreg);
|
||||||
|
thlcgjvm(hlcg).a_load_reg_loc(current_asmdata.CurrAsmList,target.resultdef,target.resultdef,tmpreg,target.location);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure tjvminlinenode.second_box;
|
procedure tjvminlinenode.second_box;
|
||||||
|
Loading…
Reference in New Issue
Block a user