Browse Source

[PATCH 28/83] update reading / writing of global variables

From 67e8afb1d23f547542e3b4553f6305622423d499 Mon Sep 17 00:00:00 2001
From: Dmitry Boyarintsev <[email protected]>
Date: Fri, 13 Sep 2019 16:52:17 -0400

git-svn-id: branches/wasm@45905 -
nickysn 5 years ago
parent
commit
3ff0b86bcb
1 changed files with 4 additions and 5 deletions
  1. 4 5
      compiler/wasm/hlcgcpu.pas

+ 4 - 5
compiler/wasm/hlcgcpu.pas

@@ -2043,11 +2043,11 @@ implementation
     end;
 
   function thlcgwasm.loadstoreopcref(def: tdef; isload: boolean; const ref: treference; out finishandval: tcgint): tasmop;
-   (* const
+    const
                      { isload  static }
       getputopc: array[boolean,boolean] of tasmop =
-        ((a_putfield,a_putstatic),
-         (a_getfield,a_getstatic));
+        ((a_set_local,a_set_global),
+         (a_get_local,a_get_global));
     begin
       if assigned(ref.symbol) then
         begin
@@ -2069,8 +2069,7 @@ implementation
                    finishandval:=65535;
             end;
         end
-      else *)
-      begin //todo:
+      else
         result:=loadstoreopc(def,isload,ref.arrayreftype<>art_none,finishandval);
     end;