Просмотр исходного кода

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

git-svn-id: branches/wasm@47875 -
nickysn 4 лет назад
Родитель
Сommit
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;