mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 14:29:14 +02:00
+ write procdef for imports
git-svn-id: branches/wasm@47001 -
This commit is contained in:
parent
fe4f041436
commit
da5c9a978e
@ -63,6 +63,7 @@ implementation
|
|||||||
fmodule,finput,
|
fmodule,finput,
|
||||||
itcpugas,
|
itcpugas,
|
||||||
cpubase,
|
cpubase,
|
||||||
|
hlcgobj,hlcgcpu,
|
||||||
verbose;
|
verbose;
|
||||||
|
|
||||||
{ TLLVMMachineCodePlaygroundAssembler }
|
{ TLLVMMachineCodePlaygroundAssembler }
|
||||||
@ -114,9 +115,10 @@ implementation
|
|||||||
|
|
||||||
|
|
||||||
procedure TLLVMMachineCodePlaygroundAssembler.WriteImports;
|
procedure TLLVMMachineCodePlaygroundAssembler.WriteImports;
|
||||||
var
|
var
|
||||||
i : integer;
|
i : integer;
|
||||||
proc : tprocdef;
|
proc : tprocdef;
|
||||||
|
list : TAsmList;
|
||||||
begin
|
begin
|
||||||
for i:=0 to current_module.deflist.Count-1 do
|
for i:=0 to current_module.deflist.Count-1 do
|
||||||
if tdef(current_module.deflist[i]).typ = procdef then
|
if tdef(current_module.deflist[i]).typ = procdef then
|
||||||
@ -124,7 +126,11 @@ implementation
|
|||||||
proc := tprocdef(current_module.deflist[i]);
|
proc := tprocdef(current_module.deflist[i]);
|
||||||
if (po_external in proc.procoptions) and assigned(proc.import_dll) then
|
if (po_external in proc.procoptions) and assigned(proc.import_dll) then
|
||||||
begin
|
begin
|
||||||
WriteProcDef(proc);
|
//WriteProcDef(proc);
|
||||||
|
list:=TAsmList.Create;
|
||||||
|
thlcgwasm(hlcg).g_procdef(list,proc);
|
||||||
|
WriteTree(list);
|
||||||
|
list.free;
|
||||||
writer.AsmWrite(#9'.import_module'#9);
|
writer.AsmWrite(#9'.import_module'#9);
|
||||||
writer.AsmWrite(proc.mangledname);
|
writer.AsmWrite(proc.mangledname);
|
||||||
writer.AsmWrite(', ');
|
writer.AsmWrite(', ');
|
||||||
|
Loading…
Reference in New Issue
Block a user