+ introduced method TWasmExeOutput.AddToGlobalNameMap

This commit is contained in:
Nikolay Nikolov 2024-09-19 06:43:52 +03:00
parent 7c545cfa8b
commit b5d0cd57ed

View File

@ -297,8 +297,10 @@ interface
FMaxMemoryPages: Integer;
{ use for the Name section }
FFunctionNameMap: TCustomSectionNameMap;
FGlobalNameMap: TCustomSectionNameMap;
procedure AddToNameMap(var nm: TCustomSectionNameMap; aidx: UInt32; const aname: string);
procedure AddToFunctionNameMap(aidx: UInt32; const aname: string);
procedure AddToGlobalNameMap(aidx: UInt32; const aname: string);
procedure WriteWasmSection(wsid: TWasmSectionID);
procedure WriteWasmSectionIfNotEmpty(wsid: TWasmSectionID);
procedure WriteWasmCustomSection(wcst: TWasmCustomSectionType);
@ -4791,6 +4793,11 @@ implementation
AddToNameMap(FFunctionNameMap,aidx,aname);
end;
procedure TWasmExeOutput.AddToGlobalNameMap(aidx: UInt32; const aname: string);
begin
AddToNameMap(FGlobalNameMap,aidx,aname);
end;
procedure TWasmExeOutput.WriteWasmSection(wsid: TWasmSectionID);
var
b: byte;