Explorar o código

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

git-svn-id: branches/wasm@47790 -
nickysn %!s(int64=4) %!d(string=hai) anos
pai
achega
58d361049f
Modificáronse 1 ficheiros con 5 adicións e 3 borrados
  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;