浏览代码

* thlcgwasm.blocks renamed br_blocks, to ensure searching for it in the compiler
sources only finds this identifier (the word 'blocks' is used in too many
other places and comments). No functional changes.

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

nickysn 4 年之前
父节点
当前提交
ade8003fb5
共有 1 个文件被更改,包括 7 次插入7 次删除
  1. 7 7
      compiler/wasm32/hlcgcpu.pas

+ 7 - 7
compiler/wasm32/hlcgcpu.pas

@@ -42,7 +42,7 @@ uses
       fevalstackheight,
       fmaxevalstackheight: longint;
      public
-      blocks: integer;
+      br_blocks: integer;
       loopContBr: integer; // the value is different depending of the condition test
                            // if it's in the beggning the jump should be done to the loop (1)
                            // if the condition at the end, the jump should done to the end of block (0)
@@ -308,13 +308,13 @@ implementation
 
   procedure thlcgwasm.incblock;
   begin
-    inc(blocks);
+    inc(br_blocks);
   end;
 
   procedure thlcgwasm.decblock;
   begin
-    dec(blocks);
-    if blocks<0 then Internalerror(2019091807); // out of block
+    dec(br_blocks);
+    if br_blocks<0 then Internalerror(2019091807); // out of block
   end;
 
     procedure thlcgwasm.incstack(list: TAsmList; slots: longint);
@@ -1389,16 +1389,16 @@ implementation
   procedure thlcgwasm.a_jmp_always(list: TAsmList; l: tasmlabel);
     begin
       //todo: for proper jumping it's necessary to check
-      //      all active blocks (if, block, loops)
+      //      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
         list.concat(taicpu.op_const(a_i32_const, 0));
-        list.concat(taicpu.op_const(a_br,2+blocks))
+        list.concat(taicpu.op_const(a_br,2+br_blocks))
       end else if l = current_procinfo.CurrContinueLabel then begin
         list.concat(taicpu.op_const(a_i32_const, 0));
-        list.concat(taicpu.op_const(a_br,loopContBr+blocks))
+        list.concat(taicpu.op_const(a_br,loopContBr+br_blocks))
       end else begin
         Internalerror(2019091806); // unexpected jump
       end;