+ introduced tcpuprocdef.add_promising_export

This commit is contained in:
Nikolay Nikolov 2023-06-13 11:57:23 +03:00
parent 601c8f9c8b
commit c67bcf0032
2 changed files with 11 additions and 6 deletions

View File

@ -251,12 +251,7 @@ var
begin
pd:=tcpuprocdef(tprocsym(hp.sym).ProcdefList[0]);
if eo_promising_first in hp.options then
begin
if (pd.synthetickind<>tsk_none) and (pd.synthetickind<>tsk_wasm_promising) then
internalerror(2023061301);
pd.synthetickind:=tsk_wasm_promising;
pd.promising_export_name:=hp.name^;
end
pd.add_promising_export(hp.name^,false)
else
begin
nm := pd.mangledname;

View File

@ -123,6 +123,7 @@ type
function is_pushleftright: boolean; override;
function suspending_wrapper_name: ansistring;
function promising_wrapper_name: ansistring;
procedure add_promising_export(aextname: ansistring;last:boolean);
end;
tcpuprocdefclass = class of tcpuprocdef;
@ -387,6 +388,15 @@ implementation
end;
procedure tcpuprocdef.add_promising_export(aextname: ansistring; last: boolean);
begin
if (synthetickind<>tsk_none) and (synthetickind<>tsk_wasm_promising) then
internalerror(2023061301);
synthetickind:=tsk_wasm_promising;
promising_export_name:=aextname;
end;
{****************************************************************************
tcpuprocvardef
****************************************************************************}