|
@@ -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.
|