Browse Source

+ call g_checkexceptions after calls to fpc_reraise and fpc_raise_nested in
branchful exceptions mode

Nikolay Nikolov 3 years ago
parent
commit
f7b1ec2435
1 changed files with 4 additions and 0 deletions
  1. 4 0
      compiler/wasm32/nwasmflw.pas

+ 4 - 0
compiler/wasm32/nwasmflw.pas

@@ -657,6 +657,7 @@ implementation
                 hlcg.g_call_system_proc(current_asmdata.CurrAsmList,'fpc_clear_exception_flag',[],nil).resetiftemp;
                 thlcgwasm(hlcg).raiseBr:=oldRaiseBr;
                 hlcg.g_call_system_proc(current_asmdata.CurrAsmList,'fpc_raise_nested',[],nil).resetiftemp;
+                thlcgwasm(hlcg).g_checkexceptions(current_asmdata.CurrAsmList);
 
                 current_asmdata.CurrAsmList.concat(taicpu.op_none(a_end_block));
                 thlcgwasm(hlcg).decblock;
@@ -670,6 +671,7 @@ implementation
         else
           begin
             hlcg.g_call_system_proc(current_asmdata.CurrAsmList,'fpc_reraise',[],nil).resetiftemp;
+            thlcgwasm(hlcg).g_checkexceptions(current_asmdata.CurrAsmList);
             doobjectdestroyandreraisestate.newflowcontrol:=afteronflowcontrol;
           end;
 
@@ -1142,6 +1144,7 @@ implementation
           thlcgwasm(hlcg).incblock;
           thlcgwasm(hlcg).decstack(current_asmdata.CurrAsmList,1);
           hlcg.g_call_system_proc(current_asmdata.CurrAsmList,'fpc_reraise',[],nil).resetiftemp;
+          thlcgwasm(hlcg).g_checkexceptions(current_asmdata.CurrAsmList);
           current_asmdata.CurrAsmList.concat(taicpu.op_none(a_end_if));
           thlcgwasm(hlcg).decblock;
         end;
@@ -1450,6 +1453,7 @@ implementation
 
         hlcg.g_call_system_proc(current_asmdata.CurrAsmList,'fpc_clear_exception_flag',[],nil).resetiftemp;
         hlcg.g_call_system_proc(current_asmdata.CurrAsmList,'fpc_raise_nested',[],nil).resetiftemp;
+        thlcgwasm(hlcg).g_checkexceptions(current_asmdata.CurrAsmList);
 
         current_asmdata.CurrAsmList.concat(taicpu.op_none(a_end_block));
         thlcgwasm(hlcg).decblock;