Browse Source

* set the wasm tempgen direction in the parent constructor, together with the other targets

git-svn-id: branches/wasm@47801 -
nickysn 4 years ago
parent
commit
4bac65be86
2 changed files with 1 additions and 2 deletions
  1. 1 1
      compiler/tgobj.pas
  2. 0 1
      compiler/wasm32/tgcpu.pas

+ 1 - 1
compiler/tgobj.pas

@@ -184,7 +184,7 @@ implementation
        tempfreelist:=nil;
        tempfreelist:=nil;
        templist:=nil;
        templist:=nil;
        { we could create a new child class for this but I don't if it is worth the effort (FK) }
        { we could create a new child class for this but I don't if it is worth the effort (FK) }
-{$if defined(powerpc) or defined(powerpc64) or defined(avr) or defined(jvm) or defined(aarch64) or defined(xtensa)}
+{$if defined(powerpc) or defined(powerpc64) or defined(avr) or defined(jvm) or defined(aarch64) or defined(xtensa) or defined(wasm32)}
        direction:=1;
        direction:=1;
 {$else}
 {$else}
        direction:=-1;
        direction:=-1;

+ 0 - 1
compiler/wasm32/tgcpu.pas

@@ -153,7 +153,6 @@ unit tgcpu;
     constructor ttgwasm.create;
     constructor ttgwasm.create;
       begin
       begin
         inherited create;
         inherited create;
-        direction := 1; // temp variables are allocated as "locals", and it starts with 0 and goes beyond!
         localvars:=TWasmLocalVars.Create;
         localvars:=TWasmLocalVars.Create;
       end;
       end;