Browse Source

* update the flowcontrol set in the IF node pass_generate_code

git-svn-id: branches/wasm@48183 -
nickysn 4 years ago
parent
commit
7f31c03718
1 changed files with 5 additions and 0 deletions
  1. 5 0
      compiler/wasm32/nwasmflw.pas

+ 5 - 0
compiler/wasm32/nwasmflw.pas

@@ -160,6 +160,9 @@ begin
 
   location_reset(location,LOC_VOID,OS_NO);
 
+  oldflowcontrol := flowcontrol;
+  include(flowcontrol,fc_inflowcontrol);
+
   //todo: MOVE all current_asm_data actions to Wasm HL CodeGen
 
   secondpass(left); // condition exprssions
@@ -180,6 +183,8 @@ begin
 
   current_asmdata.CurrAsmList.concat(taicpu.op_none(a_end_if));
   thlcgwasm(hlcg).decblock;
+
+  flowcontrol := oldflowcontrol + (flowcontrol - [fc_inflowcontrol]);
 end;
 
 initialization