mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 20:29:32 +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;
|
||||
lenpara: tnode;
|
||||
emptystr: ansichar;
|
||||
tmpreg: tregister;
|
||||
begin
|
||||
target:=tcallparanode(left).left;
|
||||
lenpara:=tcallparanode(tcallparanode(left).right).left;
|
||||
@ -772,6 +773,10 @@ implementation
|
||||
internalerror(2011031801);
|
||||
|
||||
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
|
||||
begin
|
||||
emptystr:=#0;
|
||||
@ -787,7 +792,8 @@ implementation
|
||||
end
|
||||
else
|
||||
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;
|
||||
|
||||
procedure tjvminlinenode.second_box;
|
||||
|
Loading…
Reference in New Issue
Block a user