mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-19 23:19:24 +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 = class(tcgcallnode)
|
||||
protected
|
||||
procedure do_release_unused_return_value; override;
|
||||
procedure set_result_location(realresdef: tstoreddef); override;
|
||||
end;
|
||||
|
||||
@ -50,6 +52,15 @@ implementation
|
||||
|
||||
{ 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);
|
||||
begin
|
||||
// default implementation is placing the return value on LOC_REGISTER.
|
||||
|
Loading…
Reference in New Issue
Block a user