mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 14:09:20 +02:00
* fixed popping the unused function results of methods returning implicit
function pointer type results (records, shorstrings, ...): always pop a single stack slot in that case git-svn-id: branches/jvmbackend@19598 -
This commit is contained in:
parent
8bca3e9b0b
commit
1401c4e573
@ -415,26 +415,25 @@ implementation
|
|||||||
if (tabstractprocdef(procdefinition).proctypeoption=potype_constructor) and
|
if (tabstractprocdef(procdefinition).proctypeoption=potype_constructor) and
|
||||||
(current_procinfo.procdef.proctypeoption=potype_constructor) then
|
(current_procinfo.procdef.proctypeoption=potype_constructor) then
|
||||||
exit;
|
exit;
|
||||||
|
if is_void(resultdef) then
|
||||||
|
exit;
|
||||||
if (location.loc=LOC_REFERENCE) then
|
if (location.loc=LOC_REFERENCE) then
|
||||||
tg.ungetiftemp(current_asmdata.CurrAsmList,location.reference);
|
tg.ungetiftemp(current_asmdata.CurrAsmList,location.reference);
|
||||||
if assigned(funcretnode) then
|
if assigned(funcretnode) then
|
||||||
exit;
|
exit;
|
||||||
case resultdef.size of
|
if jvmimplicitpointertype(resultdef) or
|
||||||
0:
|
(resultdef.size in [1..4]) then
|
||||||
;
|
begin
|
||||||
1..4:
|
current_asmdata.CurrAsmList.concat(taicpu.op_none(a_pop));
|
||||||
begin
|
thlcgjvm(hlcg).decstack(current_asmdata.CurrAsmList,1);
|
||||||
current_asmdata.CurrAsmList.concat(taicpu.op_none(a_pop));
|
end
|
||||||
thlcgjvm(hlcg).decstack(current_asmdata.CurrAsmList,1);
|
else if resultdef.size=8 then
|
||||||
end;
|
begin
|
||||||
8:
|
current_asmdata.CurrAsmList.concat(taicpu.op_none(a_pop2));
|
||||||
begin
|
thlcgjvm(hlcg).decstack(current_asmdata.CurrAsmList,2);
|
||||||
current_asmdata.CurrAsmList.concat(taicpu.op_none(a_pop2));
|
end
|
||||||
thlcgjvm(hlcg).decstack(current_asmdata.CurrAsmList,2);
|
else
|
||||||
end
|
internalerror(2011010305);
|
||||||
else
|
|
||||||
internalerror(2011010305);
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user