瀏覽代碼

* workaround for the raise node generating invalid WebAssembly code for
obtaining the current address. Note that exception handling in WebAssembly
doesn't work. This only fixes the raise node enough to generate valid (but not
correct) WebAssembly code. This is a temporary fix to allow the SysUtils unit
to be compiled. Eventually, exception handling for WebAssembly will need to be
rewritten entirely, in order to make exceptions work properly.

git-svn-id: trunk@49259 -

nickysn 4 年之前
父節點
當前提交
bc42d64348
共有 1 個文件被更改,包括 5 次插入4 次删除
  1. 5 4
      compiler/wasm32/nwasmflw.pas

+ 5 - 4
compiler/wasm32/nwasmflw.pas

@@ -217,7 +217,7 @@ implementation
     function twasmraisenode.pass_1 : tnode;
       var
         statements : tstatementnode;
-        current_addr : tlabelnode;
+        //current_addr : tlabelnode;
         raisenode : tcallnode;
       begin
         result:=internalstatements(statements);
@@ -240,9 +240,10 @@ implementation
             else
               begin
                 third:=cinlinenode.create(in_get_frame,false,nil);
-                current_addr:=clabelnode.create(cnothingnode.create,clabelsym.create('$raiseaddr'));
-                addstatement(statements,current_addr);
-                right:=caddrnode.create(cloadnode.create(current_addr.labsym,current_addr.labsym.owner));
+                //current_addr:=clabelnode.create(cnothingnode.create,clabelsym.create('$raiseaddr'));
+                //addstatement(statements,current_addr);
+                //right:=caddrnode.create(cloadnode.create(current_addr.labsym,current_addr.labsym.owner));
+                right:=cnilnode.create;
 
                 { raise address off by one so we are for sure inside the action area for the raise }
                 if tf_use_psabieh in target_info.flags then