Преглед на файлове

* set the last=true property of the last tai_local in the locals list in the
beginning of insert_localslist, instead of in the end of prepare_locals

Nikolay Nikolov преди 1 година
родител
ревизия
8b00598cab
променени са 1 файла, в които са добавени 5 реда и са изтрити 3 реда
  1. 5 3
      compiler/wasm32/cpupi.pas

+ 5 - 3
compiler/wasm32/cpupi.pas

@@ -670,13 +670,15 @@ implementation
                 l:=l.nextseq;
                 Inc(FFirstFreeLocal);
               end;
-            if assigned(local) then
-              local.last:=true;
           end;
 
         procedure insert_localslist(destlist,localslist: TAsmList);
           begin
-            destlist.insertListAfter(findfirst_tai_functype(destlist),localslist);
+            if assigned(localslist) then
+              begin
+                tai_local(localslist.Last).last:=true;
+                destlist.insertListAfter(findfirst_tai_functype(destlist),localslist);
+              end;
           end;
 
       var