浏览代码

* 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
       var
         wbt: TWasmBasicType;
         wbt: TWasmBasicType;
       begin
       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;
           inherited;
       end;
       end;