Browse Source

* fixed formatting in thlcgwasm.a_jmp_always

git-svn-id: branches/wasm@48034 -
nickysn 4 years ago
parent
commit
c92d27dadb
1 changed files with 3 additions and 9 deletions
  1. 3 9
      compiler/wasm32/hlcgcpu.pas

+ 3 - 9
compiler/wasm32/hlcgcpu.pas

@@ -1389,18 +1389,12 @@ implementation
 
 
   procedure thlcgwasm.a_jmp_always(list: TAsmList; l: tasmlabel);
   procedure thlcgwasm.a_jmp_always(list: TAsmList; l: tasmlabel);
     begin
     begin
-      //todo: for proper jumping it's necessary to check
-      //      all active br_blocks (if, block, loops)
-      //      and jump to the proper one.
-      //list.concat(taicpu.op_const(a_i32_const, 0));
-      if l = current_procinfo.CurrBreakLabel then begin
-        // todo: this should be moved to node generator pass2
+      if l = current_procinfo.CurrBreakLabel then
         list.concat(taicpu.op_const(a_br,br_blocks-loopBreakBr))
         list.concat(taicpu.op_const(a_br,br_blocks-loopBreakBr))
-      end else if l = current_procinfo.CurrContinueLabel then begin
+      else if l = current_procinfo.CurrContinueLabel then
         list.concat(taicpu.op_const(a_br,br_blocks-loopContBr))
         list.concat(taicpu.op_const(a_br,br_blocks-loopContBr))
-      end else begin
+      else
         Internalerror(2019091806); // unexpected jump
         Internalerror(2019091806); // unexpected jump
-      end;
     end;
     end;
 
 
   procedure thlcgwasm.concatcopy_normal_array(list: TAsmList; size: tdef; const source, dest: treference);
   procedure thlcgwasm.concatcopy_normal_array(list: TAsmList; size: tdef; const source, dest: treference);