فهرست منبع

* only allocate a local for tt_regallocator temps in ttgwasm.gethltemp

git-svn-id: branches/wasm@47875 -
nickysn 4 سال پیش
والد
کامیت
c3ac9eb559
1فایلهای تغییر یافته به همراه8 افزوده شده و 3 حذف شده
  1. 8 3
      compiler/wasm32/tgcpu.pas

+ 8 - 3
compiler/wasm32/tgcpu.pas

@@ -188,9 +188,14 @@ unit tgcpu;
       var
         wbt: TWasmBasicType;
       begin
-        if Assigned(def) and defToWasmBasic(def, wbt) then begin
-          allocLocalVarToRef(wbt, ref);
-        end else
+        if temptype=tt_regallocator then
+          begin
+            if Assigned(def) and defToWasmBasic(def, wbt) then
+              allocLocalVarToRef(wbt, ref)
+            else
+              internalerror(2020121801);
+          end
+        else
           inherited;
       end;