Browse Source

+ introduced twasmraisenode.pass_1_no_exceptions

Nikolay Nikolov 3 years ago
parent
commit
65a5b299c6
1 changed files with 12 additions and 1 deletions
  1. 12 1
      compiler/wasm32/nwasmflw.pas

+ 12 - 1
compiler/wasm32/nwasmflw.pas

@@ -52,6 +52,8 @@ interface
       { twasmraisenode }
       { twasmraisenode }
 
 
       twasmraisenode = class(tcgraisenode)
       twasmraisenode = class(tcgraisenode)
+      private
+        function pass_1_no_exceptions : tnode;
       public
       public
         function pass_1 : tnode;override;
         function pass_1 : tnode;override;
       end;
       end;
@@ -222,7 +224,7 @@ implementation
                              twasmraisenode
                              twasmraisenode
 *****************************************************************************}
 *****************************************************************************}
 
 
-    function twasmraisenode.pass_1 : tnode;
+    function twasmraisenode.pass_1_no_exceptions : tnode;
       var
       var
         statements : tstatementnode;
         statements : tstatementnode;
         //current_addr : tlabelnode;
         //current_addr : tlabelnode;
@@ -278,6 +280,15 @@ implementation
         third:=nil;
         third:=nil;
       end;
       end;
 
 
+
+    function twasmraisenode.pass_1 : tnode;
+      begin
+        if ts_wasm_no_exceptions in current_settings.targetswitches then
+          result:=pass_1_no_exceptions
+        else
+          result:=inherited;
+      end;
+
 {*****************************************************************************
 {*****************************************************************************
                              twasmtryexceptnode
                              twasmtryexceptnode
 *****************************************************************************}
 *****************************************************************************}