Browse Source

+ also call incblock and decblock in the second_addboolean for the shortcut boolean evaluation. This avoids breaking
break and continue inside inlined functions, used in an expression.

git-svn-id: branches/wasm@48033 -

nickysn 4 years ago
parent
commit
f40bfcc662
1 changed files with 3 additions and 0 deletions
  1. 3 0
      compiler/wasm32/nwasmadd.pas

+ 3 - 0
compiler/wasm32/nwasmadd.pas

@@ -262,6 +262,7 @@ interface
         begin
           secondpass(left);
           current_asmdata.CurrAsmList.Concat(taicpu.op_functype(a_if,TWasmFuncType.Create([],[wbt_i32])));
+          thlcgwasm(hlcg).incblock;
 
           case nodetype of
               andn :
@@ -276,6 +277,7 @@ interface
                    // for "and" must end evaluation immediately
                    current_asmdata.CurrAsmList.Concat( taicpu.op_const(a_i32_const, 0) );
                    current_asmdata.CurrAsmList.Concat( taicpu.op_none(a_end_if) );
+                   thlcgwasm(hlcg).decblock;
                 end;
               orn :
                 begin
@@ -290,6 +292,7 @@ interface
                    // inside of ELSE (the condition evaluated as false)
                    // for "and" must end evaluation immediately
                    current_asmdata.CurrAsmList.Concat( taicpu.op_none(a_end_if) );
+                   thlcgwasm(hlcg).decblock;
                 end;
               else
                 Internalerror(2019091902);