浏览代码

* extracted the import preparation to a separate method TWasmExeOutput.PrepareImports

Nikolay Nikolov 1 年之前
父节点
当前提交
f5dbd38b7e
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      compiler/ogwasm.pas

+ 6 - 0
compiler/ogwasm.pas

@@ -230,6 +230,7 @@ interface
 
         FWasmSections: array [TWasmSectionID] of tdynamicarray;
         procedure WriteWasmSection(wsid: TWasmSectionID);
+        procedure PrepareImports;
       protected
         function writeData:boolean;override;
         procedure DoRelocationFixup(objsec:TObjSection);override;
@@ -4169,6 +4170,11 @@ implementation
       end;
 
     procedure TWasmExeOutput.AfterUnusedSectionRemoval;
+      begin
+        PrepareImports;
+      end;
+
+    procedure TWasmExeOutput.PrepareImports;
 
       function AddFunctionImport(const libname,symname:TCmdStr; functype: TWasmFuncType): Integer;
         begin