Explorar el Código

* WebAssembly codegen: fixed access to absolute variables, pointing to just a constant address, e.g. var a: longint absolute 5;

Nikolay Nikolov hace 6 meses
padre
commit
2e77e1a471
Se han modificado 1 ficheros con 4 adiciones y 6 borrados
  1. 4 6
      compiler/wasm32/hlcgcpu.pas

+ 4 - 6
compiler/wasm32/hlcgcpu.pas

@@ -1319,12 +1319,10 @@ implementation
         end
         end
       else
       else
         begin
         begin
-          { static field -> nothing to do here, except for validity check }
-          {if not assigned(ref.symbol) or
-             (ref.offset<>0) then
-          begin
-            internalerror(2010120525);
-          end;}
+          { no symbol, no index, just fixed address, e.g. var a: longint absolute 5; }
+          list.Concat(taicpu.op_const(a_i32_const,0));
+          incstack(list,1);
+          result:=1;
         end;
         end;
     end;
     end;