mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 10:09:20 +02:00
+ introduced method TWasmExeOutput.AddToNameMap
This commit is contained in:
parent
85143f515d
commit
7c545cfa8b
@ -297,6 +297,7 @@ interface
|
|||||||
FMaxMemoryPages: Integer;
|
FMaxMemoryPages: Integer;
|
||||||
{ use for the Name section }
|
{ use for the Name section }
|
||||||
FFunctionNameMap: TCustomSectionNameMap;
|
FFunctionNameMap: TCustomSectionNameMap;
|
||||||
|
procedure AddToNameMap(var nm: TCustomSectionNameMap; aidx: UInt32; const aname: string);
|
||||||
procedure AddToFunctionNameMap(aidx: UInt32; const aname: string);
|
procedure AddToFunctionNameMap(aidx: UInt32; const aname: string);
|
||||||
procedure WriteWasmSection(wsid: TWasmSectionID);
|
procedure WriteWasmSection(wsid: TWasmSectionID);
|
||||||
procedure WriteWasmSectionIfNotEmpty(wsid: TWasmSectionID);
|
procedure WriteWasmSectionIfNotEmpty(wsid: TWasmSectionID);
|
||||||
@ -4775,16 +4776,21 @@ implementation
|
|||||||
TWasmExeOutput
|
TWasmExeOutput
|
||||||
****************************************************************************}
|
****************************************************************************}
|
||||||
|
|
||||||
procedure TWasmExeOutput.AddToFunctionNameMap(aidx: UInt32; const aname: string);
|
procedure TWasmExeOutput.AddToNameMap(var nm: TCustomSectionNameMap; aidx: UInt32; const aname: string);
|
||||||
begin
|
begin
|
||||||
SetLength(FFunctionNameMap,Length(FFunctionNameMap)+1);
|
SetLength(nm,Length(nm)+1);
|
||||||
with FFunctionNameMap[High(FFunctionNameMap)] do
|
with nm[High(nm)] do
|
||||||
begin
|
begin
|
||||||
idx:=aidx;
|
idx:=aidx;
|
||||||
name:=aname;
|
name:=aname;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TWasmExeOutput.AddToFunctionNameMap(aidx: UInt32; const aname: string);
|
||||||
|
begin
|
||||||
|
AddToNameMap(FFunctionNameMap,aidx,aname);
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TWasmExeOutput.WriteWasmSection(wsid: TWasmSectionID);
|
procedure TWasmExeOutput.WriteWasmSection(wsid: TWasmSectionID);
|
||||||
var
|
var
|
||||||
b: byte;
|
b: byte;
|
||||||
|
Loading…
Reference in New Issue
Block a user