Browse Source

* copy all wasm parameters to the local stack, so that their address can be taken

git-svn-id: branches/wasm@47947 -
nickysn 4 years ago
parent
commit
c24446c037
1 changed files with 3 additions and 2 deletions
  1. 3 2
      compiler/wasm32/cpupara.pas

+ 3 - 2
compiler/wasm32/cpupara.pas

@@ -200,8 +200,9 @@ implementation
 
     function tcpuparamanager.param_use_paraloc(const cgpara: tcgpara): boolean;
       begin
-        { all parameters are copied by the VM to local variable locations }
-        result:=true;
+        { all parameters are copied to the linear stack, so that their address
+          can be taken }
+        result:=false;
       end;
 
     function tcpuparamanager.ret_in_param(def:tdef;pd:tabstractprocdef):boolean;