mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 15:09:19 +02:00
* drop unused return values from the stack
git-svn-id: branches/wasm@48036 -
This commit is contained in:
parent
0cdd7d4d22
commit
f86665b97f
@ -39,6 +39,8 @@ interface
|
|||||||
{ twasmcallnode }
|
{ twasmcallnode }
|
||||||
|
|
||||||
twasmcallnode = class(tcgcallnode)
|
twasmcallnode = class(tcgcallnode)
|
||||||
|
protected
|
||||||
|
procedure do_release_unused_return_value; override;
|
||||||
procedure set_result_location(realresdef: tstoreddef); override;
|
procedure set_result_location(realresdef: tstoreddef); override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -50,6 +52,15 @@ implementation
|
|||||||
|
|
||||||
{ twasmcallnode }
|
{ twasmcallnode }
|
||||||
|
|
||||||
|
procedure twasmcallnode.do_release_unused_return_value;
|
||||||
|
begin
|
||||||
|
if is_void(resultdef) then
|
||||||
|
exit;
|
||||||
|
current_asmdata.CurrAsmList.concat(taicpu.op_none(a_drop));
|
||||||
|
// todo: decstack
|
||||||
|
//thlcgwasm(hlcg).decstack(current_asmdata.CurrAsmList,1);
|
||||||
|
end;
|
||||||
|
|
||||||
procedure twasmcallnode.set_result_location(realresdef: tstoreddef);
|
procedure twasmcallnode.set_result_location(realresdef: tstoreddef);
|
||||||
begin
|
begin
|
||||||
// default implementation is placing the return value on LOC_REGISTER.
|
// default implementation is placing the return value on LOC_REGISTER.
|
||||||
|
Loading…
Reference in New Issue
Block a user