浏览代码

* moved the insertion of the wasm locals asmlist to a local subroutine

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

+ 6 - 1
compiler/wasm32/cpupi.pas

@@ -674,12 +674,17 @@ implementation
               local.last:=true;
           end;
 
+        procedure insert_localslist(destlist,localslist: TAsmList);
+          begin
+            destlist.insertListAfter(findfirst_tai_functype(destlist),localslist);
+          end;
+
       var
         localslist: TAsmList;
         labels_resolved: Boolean;
       begin
         localslist:=prepare_locals;
-        aktproccode.insertListAfter(findfirst_tai_functype(aktproccode),localslist);
+        insert_localslist(aktproccode,localslist);
         localslist.Free;
 
         replace_local_frame_pointer(aktproccode);