Parcourir la source

* some optimizations in TWasmLocalVars.dealloc(index: integer)

git-svn-id: branches/wasm@47790 -
nickysn il y a 4 ans
Parent
commit
58d361049f
1 fichiers modifiés avec 5 ajouts et 3 suppressions
  1. 5 3
      compiler/wasm32/tgcpu.pas

+ 5 - 3
compiler/wasm32/tgcpu.pas

@@ -454,10 +454,12 @@ unit tgcpu;
 
     procedure TWasmLocalVars.dealloc(index: integer);
       var
-        bt: TWasmBasicType;
+        lc : TWasmLocal;
       begin
-        for bt in TWasmBasicType do
-          dealloc(bt,index);
+        lc := first;
+        while Assigned(lc) and (lc.index <> index) do
+          lc := lc.nextseq;
+        if Assigned(lc) then lc.inuse := false;
       end;